2.5.0 • Published 3 years ago

generator-uncomplicated v2.5.0

Weekly downloads
76
License
ISC
Repository
github
Last release
3 years ago

NPM Downloads NPM Version Node.js CI

generator-uncomplicated

Uncomplicated Yeoman Generator to kick-off your projects.

Install

First install Yeoman:

yarn global add yo

or

npm install -g yo

Now install the ultimate generator:

yarn global add generator-uncomplicated

or

npm install -g generator-uncomplicated

Finally, run yo uncomplicated and follow the instructions.

You can also use yo uncomplicated --jest to add Jest support or yo uncomplicated --webpack to setup the project with webpack.

Generator

Local server

Launch the static dev server:

yarn serve

Linting

You can check the code syntax and style for JavaScript and CSS.

yarn lint

You can also check individually CSS yarn lint:css, JavaScript yarn lint:js or Markdown yarn lint:md.

Features

  • Base HTML file with meta
  • Normalisation of CSS using normalize.css
  • Empty CSS file included in the HTML file
  • Empty JavaScript file included in the HTML file
  • Automatic creation of package.json
  • Automatic installation of the required NPM packages
  • License (ISC)
  • Config files (dotfiles):
    • Eslint
    • Git
    • NPM
    • Remark (Markdown)
    • Stylelint (CSS)
  • JavaScript linting with eslint
  • Markdown linting with remarklint, using the recommended preset.
  • CSS linting with stylelint following stylelint-config-standard

Options

Jest

Installing the generator with Jest:

yo uncomplicated --jest

Run tests

yarn test

Developing

You can add your tests in the test folder. The __test__/index.test.js is the entry file.

Additional features

  • Index.js with sample tests.
  • Eslint support for jest.

Webpack

Installing the generator with Webpack:

yo uncomplicated --webpack

Launching dev server

Webpack provides a dev server with hot reload:

yarn serve

Creating a build

You can create a build to deploy by running the following command:

yarn build

Additional features

  • Base HTML file with meta and icons
  • Babel support with linting
  • Automatic creation of package.json
  • JavaScript linting with eslint
  • Webpack support
    • Production and Development environments
    • Hot reload
    • CSS and JavaScript bundling
  • Automatic generation of logos and icons from logo.svg

Cookbook

Create new html file

A new HTML file, test.html in this case, can be added by adding the following code in the webpack.common.js.

plugins: [
  new HtmlWebpackPlugin({ template: 'source/index.html' }),
  new HtmlWebpackPlugin({
    filename: 'test.html',
    template: 'src/assets/test.html'
  }),
  new FaviconsWebpackPlugin('./source/assets/logo.svg'),
  new CleanWebpackPlugin()
]

You can get more information in the html-webpack-plugin.

2.1.2

3 years ago

2.5.0

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.6.1

4 years ago

1.6.0

4 years ago

1.5.9

4 years ago

1.5.8

4 years ago

1.5.7

4 years ago

1.5.6

5 years ago

1.5.5

5 years ago

1.5.3

5 years ago

1.5.2

5 years ago

1.5.1

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

0.7.10

5 years ago

1.0.0

5 years ago

1.0.4

5 years ago

0.7.9

5 years ago

0.7.7

5 years ago

0.7.5

5 years ago

0.7.4

6 years ago

0.7.3

6 years ago

0.7.2

6 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.6.1

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.5

6 years ago

0.3.3

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.5

6 years ago

0.1.1

6 years ago