@regionorebrolan/extensions
v0.0.1-alpha
Published
Library with JavaScript additions and extensions.
Downloads
5
Maintainers
Readme
JavaScript-Extensions
Library with JavaScript additions and extensions.
Solution structure
Inspired by this article/gist:
Development
During development you may want to test-publish your package. You can do this by using the GitHub Package Registry. To be able to use the GitHub Package Registry you have to:
Add the following to package.json
"publishConfig": { "registry": "https://npm.pkg.github.com/" }
Then login:
$ npm login --registry=https://npm.pkg.github.com > Username: USERNAME > Password: TOKEN > Email: PUBLIC EMAIL ADDRESS
Then you can publish your package.
Read more: Configuring NPM for use with GitHub Package Registry
If you want to consume packages from the GitHub Package Registry you have to:
Add a .npmrc-file to the root of your application.
Enter the following content in it:
@your-github-user-name:registry=https://npm.pkg.github.com/ registry=https://registry.npmjs.org/
Read more: npmrc - The npm config files
Publish
Before you can publish you need to sign in:
npm login
Username:
Password:
Email:
Publish to npm:
npm publish --access public
Information
TypeScript-bundling
- TypeScript with Babel: TypeScript-Babel-Starter
- Howto set up TypeScript-bundling with Rollup and Babel: Rollup-TypeScript-Babel
- Howto set up TypeScript-bundling with Webpack and Babel: Webpack-TypeScript-Babel
Notes
- If you sort an array with undefined values the undefined values will always be last - https://stackoverflow.com/questions/4783242/javascript-array-sort-with-undefined-values/