Setup - adaptdk/fe_tools GitHub Wiki

  • Add node module to your package.json
yarn add -D @adaptagency/fe_tools

SCSS

Include the adapt-mixins mixin file in your main.scss file

// With tilde importer
@import "~@adaptagency/fe_tools/main";

// Regular
@import "node_modules/@adaptagency/fe_tools/main";

Javascript

Assuming you're using a compiler like babel, you can import the main.js like the following

// ES6
// Importing everything
import ft from '@adaptagency/fe_tools';

// Importing individual function
import { onKeyPress } from '@adaptagency/fe_tools';

// ES5 >=
var ft = require('@adaptagency/fe_tools');     // Importing everything