![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
ngx-line-chart
Advanced tools
Build an Angular library compatible with AoT compilation & Tree shaking.
This starter allows you to create a library for Angular 4+ apps written in TypeScript, ES6 or ES5. The project is based on the official Angular packages.
Get the Changelog.
Update Node & npm.
Rename ngx-line-chart
and angularLibraryStarter
everywhere to my-library
and myLibrary
.
Update in package.json
file:
and run npm install
.
Create your classes in src
folder, and export public classes in my-library.ts
.
You can create only one module for the whole library: I suggest you create different modules for different functions, so that the user can import only those he needs and optimize Tree shaking of his app.
Update in rollup.config.js
file globals
external dependencies with those that actually you use.
Create unit & integration tests in tests
folder, or unit tests next to the things they test in src
folder, always using .spec.ts
extension.
Karma is configured to use webpack only for *.ts
files.
The following command run unit & integration tests that are in the tests
folder, and unit tests that are in src
folder:
npm test
The following command:
npm run build
dist
folder with all the files of distributionTo test locally the npm package:
npm run pack-lib
Then you can install it in an app to test it:
npm install [path]my-library-[version].tgz
Before publishing the first time:
.travis.yml
filenpm run publish-lib
To generate the documentation, this starter uses compodoc:
npm run compodoc
npm run compodoc-serve
npm install my-library --save
System.config({
map: {
'my-library': 'node_modules/my-library/bundles/my-library.umd.js'
}
});
No need to set up anything, just import it in your code.
No need to set up anything, just import it in your code.
Include the umd
bundle in your index.html
:
<script src="node_modules/my-library/bundles/my-library.umd.js"></script>
and use global ng.myLibrary
namespace.
The library is compatible with AoT compilation.
package.json
"main": "./bundles/ngx-line-chart.umd.js"
legacy module format"module": "./bundles/ngx-line-chart.es5.js"
flat ES module, for using module bundlers such as Rollup or webpack:
package module"es2015": "./bundles/ngx-line-chart.js"
ES2015 flat ESM format, experimental ES2015 build"peerDependencies"
the packages and their versions required by the library when it will be installedtsconfig.json
file used by TypeScript compiler
"strict": true
enables TypeScript strict
master optiontsconfig-build.json
file used by ngc compiler
Compiler options:
"declaration": true
to emit TypeScript declaration files"module": "es2015"
& "target": "es2015"
are used by Rollup to create the ES2015 bundleAngular Compiler Options:
"skipTemplateCodegen": true,
skips generating AoT files"annotateForClosureCompiler": true
for compatibility with Google Closure compiler"strictMetadataEmit": true
without emitting metadata files, the library will not compatible with AoT compilationrollup.config.js
file used by Rollup
format: 'umd'
the Universal Module Definition pattern is used by Angular for its bundlesmoduleName: 'ng.angularLibraryStarter'
defines the global namespace used by JavaScript appsexternal
& globals
declare the external packagesServer-side prerendering
If you want the library will be compatible with server-side prerendering:
window
, document
, navigator
and other browser types do not exist on the serverMIT
FAQs
Good-looking, easy-to-use, customizable Angular line chart library for 1 or 2 data sets with separate or common y-axes.
The npm package ngx-line-chart receives a total of 112 weekly downloads. As such, ngx-line-chart popularity was classified as not popular.
We found that ngx-line-chart demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.