Skip to content

Commit

Permalink
Merged release/0.0.1 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinGot committed Dec 9, 2016
2 parents ae0cf74 + 737b605 commit 7205e34
Show file tree
Hide file tree
Showing 106 changed files with 3,958 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
templates
161 changes: 161 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
{
"extends": "eslint:recommended",
"env": {
"node": true,
"mocha": true
},
"parserOptions": {
"ecmaVersion": 6
},
"rules": {
"no-template-curly-in-string": "error",
"no-unsafe-negation": "error",
"block-scoped-var": "error",
"curly": "error",
"default-case": "error",
"dot-notation": "error",
"dot-location": ["warn", "property"],
"eqeqeq": "error",
"guard-for-in": "error",
"no-alert": "error",
"no-caller": "error",
"no-div-regex": "error",
"no-else-return": "error",
"no-eq-null": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-label": "error",
"no-floating-decimal": "error",
"no-global-assign": "error",
"no-implicit-coercion": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-iterator": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-multi-spaces": "error",
"no-multi-str": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-new": "error",
"no-octal-escape": "error",
"no-param-reassign": "error",
"no-proto": "error",
"no-return-assign": ["error", "always"],
"no-self-compare": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"no-unmodified-loop-condition": "error",
"no-unused-expressions": "error",
"no-unused-labels": "error",
"no-useless-call": "error",
"no-useless-concat": "error",
"no-useless-escape": "error",
"no-void": "error",
"no-warning-comments": "warn",
"no-with": "error",
"radix": "error",
"no-label-var": "error",
"no-restricted-globals": ["error", "event"],
"no-shadow-restricted-names": "error",
"no-undef-init": "error",
"no-undef": ["error", {
"typeof": true
}],
"no-use-before-define": ["error", "nofunc"],
"strict": ["error", "safe"],
"brace-style": "error",
"comma-dangle": ["error", "never"],
"comma-spacing": "error",
"comma-style": "error",
"func-call-spacing": ["error", "never"],
"func-names": ["error", "never"],
"indent": ["error", 2, {
"SwitchCase": 1
}],
"key-spacing": ["error", {
"beforeColon": false,
"afterColon": true
}],
"keyword-spacing": "error",
"linebreak-style": ["error", "unix"],
"max-depth": "warn",
"space-before-function-paren": ["error", "always"],
"max-nested-callbacks": ["warn", 4],
"max-params": ["warn", {
"max": 4
}],
"max-statements-per-line": "error",
"new-cap": ["error", {
"newIsCap": true,
"capIsNew": true
}],
"new-parens": "error",
"no-array-constructor": "error",
"no-lonely-if": "error",
"no-mixed-operators": "error",
"no-mixed-spaces-and-tabs": "error",
"no-multiple-empty-lines": ["error", {
"max": 1
}],
"no-negated-condition": "error",
"no-new-object": "error",
"no-restricted-syntax": ["error", "WithStatement"],
"no-whitespace-before-property": "error",
"no-trailing-spaces": "error",
"no-unneeded-ternary": "error",
"object-curly-spacing": ["error", "never"],
"one-var": ["error", "never"],
"one-var-declaration-per-line": "error",
"operator-assignment": ["error", "always"],
"operator-linebreak": ["error", "after"],
"quote-props": ["error", "as-needed"],
"quotes": ["error", "single", {
"allowTemplateLiterals": true
}],
"semi-spacing": ["error", {
"before": false,
"after": true
}],
"semi": ["error", "always"],
"space-before-blocks": ["error", "always"],
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": ["error", "always", {
"line": {
"exceptions": ["-"]
},
"block": {
"markers": ["!"],
"balanced": true
}
}],
"unicode-bom": ["error", "never"],
"arrow-parens": ["error", "as-needed"],
"arrow-spacing": ["error", {
"before": true,
"after": true
}],
"constructor-super": "error",
"generator-star-spacing": ["error", "both"],
"no-class-assign": "error",
"no-const-assign": "error",
"no-dupe-class-members": "error",
"no-duplicate-imports": ["error", {
"includeExports": true
}],
"no-new-symbol": "error",
"no-this-before-super": "error",
"no-useless-computed-key": "error",
"no-useless-constructor": "error",
"no-useless-rename": "error",
"require-yield": "error",
"rest-spread-spacing": ["error", "never"],
"symbol-description": "error",
"template-curly-spacing": "error",
"yield-star-spacing": ["error", "both"]
}
}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Logs
logs
*.log
npm-debug.log*

# Dependency directories
node_modules

# WebStorm
.idea/
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
language: node_js
node_js:
- "6"
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Change Log

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 0.0.1

### Added

- **css-preprocessors**: which CSS preprocessor do you want? from [@aguele] & [@jledentu]
- **resource**: would you like to use a REST resource library? from [@vgo]
- **environments**: management application environments from [@vgo]
- **angular-translate**: angular-translate (18n for your Angular app, made easy!) from [@vgo]
- **ui-router**: use [AngularUI Router](https://github.com/angular-ui/ui-router) by default from [@jledentu]
- **ui-frameworks**: Which UI framework do you want? from [@vgo]
- **linting**: Add ESLint, HTMLHint, SCSSLint & CSSLint support from [@vgo]
- **package-manager**: Let's you choose between **npm** or **Yarn** package manager from [@vgo]
- **postcss**: Add PostCSS treatments from [@vgo]
- **debug**: Disable the [debug info](https://docs.angularjs.org/api/ng/provider/$compileProvider#debugInfoEnabled) in production environement from [@ole]
- **sonar**: Generate linters reporters for the [SonarQube](https://github.com/groupe-sii/sonar-web-frontend-plugin) plugin from [@vgo]
- **json-server**: Allows you to easily create a RESTFull API for your application from [@ole]
- **application name**: Let's you choose the name of your application from [@ole]
- **documentation**: Generate documentation with dgeni from [@ole]
- **tests**: Create unit tests with Karma from [@jledentu]

[@aguele]: https://github.com/aguele
[@jledentu]: https://github.com/jledentu
[@ole]: https://github.com/liollury
[@vgo]: https://github.com/ValentinGot
111 changes: 109 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,109 @@
# generator-webpack-angular
generator-webpack-angular
# Generator Webpack Angular
[![Build Status](https://travis-ci.org/groupe-sii/generator-webpack-angular.svg?branch=master)](https://travis-ci.org/groupe-sii/generator-webpack-angular)

> Yeoman generator for building Single Page Apps with AngularJS, ES6, Webpack.
## Generator

What's included in details over [here](docs/STACK.md)

### Stack

[![AngularJS](assets/angularjs.png "AngularJS")](https://angularjs.org/)
[![Webpack](assets/webpack.png "Webpack")](https://webpack.github.io/)
[![Karma](assets/karma.png "Karma")](https://karma-runner.github.io)
[![ESLint](assets/eslint.png "ESLint")](http://eslint.org/)

### CSS preprocessors

![CSS](assets/css3.png "CSS 3")
[![Sass](assets/sass.png "Sass")](http://sass-lang.com/)
[![Less](assets/less.png "Less")](http://lesscss.org/)

### UI Frameworks

[![AngularJS Material](assets/angularjs-material.png "AngularJS Material")](https://material.angularjs.org/latest/)
[![Bootstrap](assets/bootstrap.png "Bootstrap")](http://getbootstrap.com/)

### Modules

[![angular-translate](assets/angular-translate.png "Angular Translate")](https://angular-translate.github.io/)
[![json-server](assets/json-server.png "JSON Server")](https://github.com/typicode/json-server)
[![SonarQube](assets/sonar-qube.png "sonar-web-frontend-reporters")](https://github.com/groupe-sii/sonar-web-frontend-reporters)

### Doc generator
[![dgeni](assets/dgeni.png "DGeni")](https://github.com/angular/dgeni)

### Package Managers

[![npm](assets/npm.png "npm")](https://www.npmjs.com/)
[![Yarn](assets/yarn.png "Yarn")](https://yarnpkg.com/)

## Usage

### Install

#### Install required tools `yo`:

```sh
$ npm install -g yo
```

#### Install `generator-webpack-angular`:

```sh
$ npm install @groupe-sii/generator-webpack-angular
```

### Run

#### Create a new directory, and go into:

```sh
$ mkdir my-new-project && cd my-new-project
```

#### Run `yo @groupe-sii/webpack-angular`, and select desired technologies:

```sh
$ yo @groupe-sii/webpack-angular
```

#### Use NPM scripts

- `npm start` to launch `npm run server` and `json-server` (if checked) in parallel
- `npm run serve` to launch a webpack-dev-server server on your source files
- `npm run serve:prod` to launch a webpack-dev-server server on your source files in a **production** environment
- `npm run build` to build an optimized version of your application in /dist + docs generation
- `npm run build:prod` to build an optimized version of your application in /dist in a **production** environment + docs generation
- `npm run test` to launch your unit tests with Karma
- `npm run lint` to launch linting process
- `npm run sonar:reporters` to create the linters reporters for SonarQube plugin (Only if it was chosen)
- `npm run json-server` to start a json-server (Only if it was chosen)

## [Changelog](https://github.com/groupe-sii/generator-webpack-angular/blob/master/CHANGELOG.md)

## Roadmap

- [x] How to call REST APIs ? ($resource, Restangular)
- [x] Handle environments
- [x] angular-translate support
- [x] UI Router as default router
- [x] CSS preprocessors (CSS, Sass, Less)
- [x] Angular modules choice (angular-animate, angular-touch, ...)
- [x] UI Frameworks choice (angular-material, bootstrap)
- [x] Linters (ESLint, HTMLHint, SASSLint, CSSLint)
- [x] PostCSS integration
- [x] Mock server REST API with json-server
- [x] Sonar reporters
- [x] Ask user for application name
- [x] Unit tests with Karma and Mocha
- [x] Code coverage
- [ ] Landing page post generation
- [x] Dgeni to generate documentation

## License

MIT License

Copyright (c) 2016 Groupe SII
Binary file added assets/angular-translate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/angularjs-material.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/angularjs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/bootstrap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/css3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/dgeni.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/eslint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/foundation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/json-server.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/karma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/less.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/npm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sonar-qube.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ui-router.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/webpack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/yarn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions docs/STACK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Generator - Stack

- [**AngularJS**](https://angularjs.org/): HTML enhanced for web apps!
- [**Webpack**](https://webpack.github.io/): A bundler for javascript and friends.

## CSS preprocessors

Let's you choose between these CSS preprocessors:

- **CSS**: Pure CSS3.
- [**Sass**](http://sass-lang.com/): CSS with superpowers.
- [**Less**](http://lesscss.org/): The dynamic stylesheet language.

## UI Frameworks

Let's you choose between these frameworks:

- [**Bootstrap**](http://getbootstrap.com/): The most popular HTML, CSS, and JS framework.
- [**Angular Material**](https://material.angularjs.org/latest/): The reference implementation of the Google's Material Design specification.

## Testing

- [**Karma**](https://karma-runner.github.io/): Spectacular Test Runner for JavaScript.

## Linting

- [**ESLint**](http://eslint.org/): The pluggable linting utility for JavaScript and JSX.
- [**HTMLHint**](http://htmlhint.com/): A Static Code Analysis Tool for HTML.
- [**SASSLint**](https://github.com/sasstools/sass-lint): Pure Node.js Sass linting.
- [**CSSLint**](https://github.com/CSSLint/csslint): Automated linting of Cascading Stylesheets.

## Angular modules

Let's you choose between these modules:

- [**ngAnimate**](https://docs.angularjs.org/api/ngAnimate): Provides support for CSS-based animations (keyframes and transitions) as well as JavaScript-based animations via callback hooks.
- [**ngCookies**](https://docs.angularjs.org/api/ngCookies): Provides a convenient wrapper for reading and writing browser cookies.
- [**ngTouch**](https://docs.angularjs.org/api/ngTouch): Provides touch events and other helpers for touch-enabled devices.
- [**ngSanitize**](https://docs.angularjs.org/api/ngSanitize): Provides functionality to sanitize HTML.
- [**ngMessages**](https://docs.angularjs.org/api/ngMessages): Provides enhanced support for displaying messages within templates.

## Modules

Let's you choose between these modules:

- [**angular-translate**](https://angular-translate.github.io/): i18n in your Angular apps, made easy.
- [**sonar-web-frontend-reporters**](https://github.com/groupe-sii/sonar-web-frontend-reporters): Create Front-End reporters for SonarQube.
- [**json-server**](https://github.com/typicode/json-server): Allows you to easily create a RESTFull API for your application.

## Features

- [**Babel**](https://babeljs.io/): Babel is a compiler for writing next generation JavaScript.
- [**ng-annotate**](https://github.com/olov/ng-annotate): Add, remove and rebuild AngularJS dependency injection annotations.
- [**PostCSS**](https://github.com/postcss/postcss): Transforming styles with JS plugins.
- [**Autoprefixer**](https://github.com/postcss/autoprefixer): Parse CSS and add vendor prefixes to rules by [Can I Use](http://caniuse.com/).
- [**Restangular**](https://github.com/mgonto/restangular): AngularJS service to handle Rest API Restful Resources properly and easily.
- [**Commits conventions**](../templates/app/COMMITS-CONVENTION.md): Google for AngularJS Git commit guidelines.
Loading

0 comments on commit 7205e34

Please sign in to comment.