easymake-preset-default-library

easymake: default preset for make library

Usage no npm install needed!

<script type="module">
  import easymakePresetDefaultLibrary from 'https://cdn.skypack.dev/easymake-preset-default-library';
</script>

README

easymake-preset-default-library

default preset for easymake which helps to make library

documentation

You can find documentation here https://github.com/madcode-tech/easymake/wiki

preset uses:

  • coding
    • babel
      • es2015
      • es2016
      • react
      • stage-1
    • bluebird
  • linting
    • eslint
  • bundling
    • webpack
  • testing
    • karma
    • mocha
    • chai
    • sinon
    • phantomjs
    • karma-coverage

configuration in package.json:

{

  "name" - using package name as library name,

  "config" = {

    "easymake" = {

    "preset": "easymake-preset-default-library",

      "libraryTarget" - type of bundle, default 'commonjs2' (see libraryTarget ),

      "libraryBundle" - array, by default all Dependencies are externals, but if you want to bundle some dependency in your bundle - place here its name

  }

}

main tasks (preset contains additional sub-tasks):

  • create-folders
  • distributive
  • test-units

how to use:

  • easymake --run create-folders - create base folders in project directory
  • easymake --run distributive - start bundle with webpack in watch mode
  • easymake --run distributive --production - make bundle (no watch)
  • easymake --run test-units - run unit tests and generate code-coverage report