
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
generator-angular-webpack-es6
Advanced tools
Angular Webpack ES6 generator. Uses SASS as CSS preprocessor, UI router as default angular router, LazyLoading example included. Inspired by generator-gulp-angular.
Yeoman generator for AngularJS + Webpack with ES6 and SASS.
- Latest Webpack with Tree Shaking feature enabled
- Babel 6 with ES2017 features included
- Perfectly compatible with angularOcLazyLoad plugin
- SASS as CSS preprocessor
- Angular UI router as default router already included
- Optional installation bootstrap-sass source
- Optional angular modules installation
- All necessary webpack loaders already included (Sass, Images, Fonts, ngAnnotate, ngTemplateCache, etc.)
- Config has options for development and production mode
Use only webpack with npm. No external dependencies like bower, grunt, gulp...
Webpack@2 still in Beta and it may contain some bugs. Please, report them to Webpack developers directly.
yo
, and webpack
:npm install -g yo webpack
generator-angular-webpack-es6
:npm install -g generator-angular-webpack-es6
āāā /e2e/ # End to End test folder
ā āāā main.component.spec.js # End to end test example
āāā /config/ # Build config
ā āāā /webpack/ # Webpack config files
ā āāā /environments/ # Webpack env dependent configs
ā āāā global.js # Global webpack settings for all envs
āāā /dist/ # The folder for compiled output
āāā /node_modules/ # 3rd-party libraries and utilities
āāā /src/ # Source folder
ā āāā /app/ # Application code
ā ā āāā /components/ # Shared UI components
ā ā ā āāā /footer/ # Footer shared component. Place footer's styles, directives, templates here
ā ā āāā /core/ # Shared angular services/directives
ā ā ā āāā /directives/ # Shared directives
ā ā ā āāā /services/ # Shared services
ā ā ā āāā /core.module.js # Import of all core components should be here
ā ā āāā /pages/ # All pages-dependent content should place here
ā ā ā āāā /main/ # Main page
ā ā ā ā āāā /main.controller.js # Main page Controller
ā ā ā ā āāā /main.controller.spec.js # Test file for main page controller
ā ā ā ā āāā /main.html # Main page template
ā ā ā ā āāā /main.module.js # Main page module
ā ā ā ā āāā /main.route.js # Main page routes
ā ā ā āāā /.../ # Other pages...
ā ā āāā /index.bootstrap.js # Entry point. Import internal and external modules and bootstrap (RUN) angular application
ā ā āāā /index.components.js # Define all your custom components here
ā ā āāā /index.config.js # Function that will be triggered in Angular's "config" phase
ā ā āāā /index.module.js # Main application's module
ā ā āāā /index.routes.js # Describe only "otherwise" and async routes here
ā ā āāā /index.run.js # Function that will be triggered in Angular's "run" phase
ā ā āāā /index.vendor.js # Import all vendors and 3rd party plugins here
ā āāā /assets/ # Static content
ā ā āāā /images/ # Images
ā ā āāā /js/ # Extra libs folder
ā ā āāā /styles/ # Styles folder
ā ā āāā /css/ # CSS
ā ā āāā /sass/ # SASS
ā āāā favicon.ico # Application icon to be displayed in bookmarks
ā āāā tpl-index.html # Template for html-webpack-plugin that will be transpiled into index.html in /dist
āāā .babelrc # Babel config with presets and plugins
āāā .gitignore # List of files to ignore by git
āāā karma.conf.js # Karma config
āāā protractor.conf.js # protractor config
āāā spec.bundle.js # The bundle file for including in karma config
āāā package.json # The list of project dependencies and NPM scripts
āāā webpack.config.js # Bundling and optimization settings for Webpack
mkdir my-new-project && cd $_
yo angular-webpack-es6
, and select desired technologies.npm start
or npm run dev
- to start development server on http://localhost:8080.npm run build
- To make production-ready build run after few moments you will see build id dist
folder.The app uses Karma to run the unit tests, which you can find near the test target (*.spec.js files). see example test in the above directory structure. For running these tests run this command in project directory:
npm test
This command will automatically watch for changes that happening in test files and rerun the test suite To disable the above behaviour , please check package.json file
The app uses Protractor, an end-to-end test framework designed for AngularJS apps, to the end-to-end tests, which you can find in the e2e folder.
npm install
.npm run webdriver-update
.npm start
and make sure the running port match the baseUrl port in protractor.conf.js file.npm run test:e2e
.Check the example test for unit tests using jasmin api in
/src/app/pages/main/main.controller.spec.js
All your unit test files must end with .spec.js
Check the example test for e2e test in e2e directory.
/e2e/main.component.spec.js
- Problem: Webpack2 unable to import function with only export default value.
Workaround: Use
import * as variable from "package"
instead ofimport variable from "package"
- Problem: Webpack3: ExtractTextPlugin and file-loader do not work with the use syntax. Link to the issue.
- Fork repository and clone project to your machine
- Install npm packages and create new feature/fix branch
- Link local project to be able install generator with
yo
from folder like from global installed package:npm link
- Make PR
- ...
- PROFIT
- Add .dockerfile
Add example testing environment with karma and protractor- Add more dotfiles
Add better examples with lazy-loaded modulesAdded in 0.1.2Update to Babel6Added in 0.2.0
FAQs
Angular Webpack ES6 generator. Uses SASS as CSS preprocessor, UI router as default angular router, LazyLoading example included. Inspired by generator-gulp-angular.
The npm package generator-angular-webpack-es6 receives a total of 10 weekly downloads. As such, generator-angular-webpack-es6 popularity was classified as not popular.
We found that generator-angular-webpack-es6 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.