0.4.9 • Published 6 years ago

@vesta/devmaid v0.4.9

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
6 years ago

Vesta npm module development assistant

This package will help you to create typescript based npm package.

Let's consider a situation in which we want to generate module awesome-module.

  • add @vesta/devmaid to your devDependencies
  • inside your gulpfile.js:
const vesta = require('@vesta/devmaid');

// In case of multiple classes, an index file will be generated which exports all you exported classes, functions, and variables
const indexer = new vesta.Indexer(`${__dirname}/src`);
indexer.generate();

// creating packages
const pkgr = new vesta.Packager({
    // root directory of project
    root: __dirname,
    // source directory path - relative from root directory
    src: 'src',
    // these files will be copied directly to the target folders
    files: ['.npmignore', 'LICENSE', 'README.md'],
    transform: {
        // if you need to modify `package.json` for each target 
        package: (json, target) => {
            // modify package.json file based on your target
            if(target === 'es5'){
                json.dependencies['es6-promise'] = '^4.1.0';
            }
            // return true if the devmaid should execute npm install on new package.json file
            return true;
       },
       // modify tsconfig.json file based on your target
       tsconfig: (json, target) => {
            // if you need to modify `compilerOptions` of `tsconfig.json` for each target
            if(process.env.mode === 'development'){
                json.compilerOptions.sourceMap = true;
            }
        }
    }
});
// creating development & publish tasks
module.exports = pkgr.createTasks();

use gulp --tasks to see list of generated tasks.

For tsconfig the following options will be override: outFile, outDir

0.4.9

6 years ago

0.4.8

6 years ago

0.4.7

6 years ago

0.4.6

6 years ago

0.4.5

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.2.9

7 years ago

0.2.8

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.7

7 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.7

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago