0.2.3 • Published 7 years ago

cedrus-demo-loader v0.2.3

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

Cedrus Example Loader

Tasks

The following commands are available through npm run:

CommandPurpose
buildRuns code through build process via Angular compiler (ngc)
gGenerate code files (see above)
lintVerify code matches linting rules
startRun Webpack's dev-server on project (can be run as npm start)
testExecute unit tests (can be run as npm test <type>)
tagVersionCreates tag for new version and publishes

Unit Testing

Unit testing is done using Karma and Webpack. The setup is all done during the initialize command. The provided testing commands will watch your files for changes.

The two following command is provided by default:

npm test <type>

This command calls the script at tasks/test.js and runs the Karma test runner to execute the tests. Prior to running Karma, the test command looks for a command line argument, if the argument is known, it will run the associated configuration, otherwise it will run the default configuration.

Configurations

TypeTesting TypeScript
defaultRun through Chrome & PhantomJS with files being watched & tests automatically re-run
headlessRun through PhantomJS with files being watched & tests automatically re-run
singleRun through PhantomJS one time with no file watching
watchRun through Chrome with files being watched & tests automatically re-run

Note that Chrome still requires a manual refresh on the Debug tab to see updated test results.

Packaging

Packaging is as simple as publishing to NPM by doing

npm run tagVersion

To test your packages output before publishing, you can run

npm pack

Which will generate a compressed file containing your library as it will look when packaged up and published to NPM. The basic structure of a published library is:

|__examples/
   |__example.component.html
   |__example.component.ts
   |__example.main.ts
   |__example.module.ts
   |__index.html
|__src/
   |__cedrus-example-loader.module.ts
   |__index.ts
|__.npmignore
|__index.ts
|__package.json
|__README.md

As you can see, the packaging removes any files specific to developing your library.

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago