Coder Social home page Coder Social logo

testpkg's Introduction

testest package

Angular package description

Development

Commands available for package development

Within the package directory there are a number of commands to help you develop and launch a new package. Several gulp tasks are available to manage the package:

$ cd pkg
$ gulp --tasks
[16:13:41] ├── clean
[16:13:41] ├── copy-html-css
[16:13:41] ├── transpile
[16:13:41] ├── rollup
[16:13:41] ├── replace-ng-template-styles
[16:13:41] ├── minify
[16:13:41] ├── copy-package
[16:13:41] ├── test
[16:13:41] ├── test:ci
[16:13:41] ├─┬ dev
[16:13:41] │ └── build
[16:13:41] ├── build
[16:13:41] └─┬ default
[16:13:41]   └── build
  • clean: Clears the dist directory (packages releases directory).
  • transpile: Compiles the typescript files for javascript with AoT support.
  • copy-html-css: Copy the template and css files to directory dist from the package.
  • rollup: Generates a package bundle using the UMD format.
  • minify: Compresses the generated bundle through the rollup.
  • replace-ng-template-styles: Task that corrects a problem with the search of templates with relative path (mandatory in the angular). Make templateUrl replace for template: require ('template.html') and styleUrls for styles: [require ('styles.css')].
  • copy-package: Copy package_dist.json to directory dist from the package.
  • test: Run tests using karma test runner.
  • test:ci: Run tests using karma test runner with settings for CI.
  • dev: Starts a watcher that monitors changes to the code and generates a new test release.
  • build: Task that is executed when no specific task is passed as parameter. Execute in sequence:
    1. clean
    2. transpile
    3. copy-html-css
    4. rollup
    5. minify
    6. replace-ng-template-styles
    7. copy-package

Testing the package

After generating the build with gulp build or gulp dev you can test the packages locally by making a link through NPM or Yarn. Both NPM and Yarn have the link and unlink command to make local packages available for local installation.

With the build generated in dist/testest in the root of the repository, you will enter the package directory and execute:

$ yarn link

or

$ npm link

After successfully generating the link, just go to the project directory and run:

$ npm link testest

or

yarn link testest

Making a distribution

To make a release build for a packag just use gulp command without parameters.

cd pkg
gulp

This command will generate a distribution folder of the package inside dist directory.

Publishing package

To publish a packge you need go to the package dist path and run npm publish or yarn publish:

cd dist/testest
npm publish

testpkg's People

Contributors

hersonls avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.