Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
generator-polymer-typescript
Advanced tools
generator for polymer2, typescript and redux application. Bundle with webpack
generator for polymer2 typescript and redux application
First, install Yeoman and generator-polymer-typescript using npm (we assume you have pre-installed node.js). Require node version above 6.0.0
npm install -g yo
npm install -g generator-polymer-typescript
yo polymer-typescript
generates a full polymer-redux typeScript project.yo polymer-typescript:module
generates a project for pure typeScript ES6 module.yo polymer-typescript:material
generates project with one Polymer element.Then generate your new project:
yo polymer-typescript
These are the main technologies selected for this project and purpose of use
TypeScript
Leverage on typeScript syntax and strong typing to create a self documented code that scale at larger teams.
Resource: typeScript official site
ES6 Modules
Create standard JavaScript modules that are easy to reuse.
Resource: es6 modules explain
webCompoments with Polymer2
Polymer is a JavaScript library that helps you create custom reusable HTML elements. Resource: Polymer
State management with Polymer redux
Redux make easy complex state management of applications. Resource: polymer-redux
Routing with redux routing
Application routing integrated with Redux to mirror application state in the URL. Resource: redux-routing
Testing with webComponent tester
Power full testing suite to test both webComponent and ES6 module. Resource: web-component-tester
Bundle with webpack
Tranform our typeScrip code to packaged javascript application. ressource: webpack
Package management with npm and bower.
Bower is used to install client side package and Npm mainly to development dependency.
npm install
: install project dependency.
npm run tsc
: run typeScript compiler.
npm run build
build and bundle application with webpack.
npm run demo
launch application with webpack server.
npm run test
bundle test files with webpack and run test with webComponent tester.
npm run build:test:watch
bundle test files with webpack and watch on changes.
npm run test:persist
bundle test files with webpack and watch on changes.
npm run doc
generate project documentation with typedoc.
|- src project source
|--- lib (API and helper) in pure ES6 TypeScript module.
Are concerned with non UI computational tasks such as API access, data treatment, communication, data storage...
They are stateless.
Interact with others modules via asynchronous function calls.
They are built from a factory and most of the time They are singletons.
|--- presentational reusable webComponent
Are concerned with how thinks look
Don’t specify how the data is loaded or mutated
receive data via attributes or function calls.
Are notifying container component of change via event bubbling
|--- container redux-polymer components
Are concerned with how thinks works
May encapsulate other containers and presentational modules.
Provide data and configuration to other containers
They act as controller between other modules.
|--- action, reducer and store Redux helper
Register Redux action and reducer to encapsulate Redux dependency outside library and presentational modules.
|- test contains test boilerplate.
Register you modules under test `test.ts` and `modules.json`
|- types typing declare files for modules where declaration is missing.
MIT © hubjac1
FAQs
generator for polymer2, typescript and redux application. Bundle with webpack
The npm package generator-polymer-typescript receives a total of 0 weekly downloads. As such, generator-polymer-typescript popularity was classified as not popular.
We found that generator-polymer-typescript demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.