10 Commits

Author SHA1 Message Date
Stephan Herzog
3c55a13971 Added support for configuring a className prefix (#310)
This feature allows users to put a `cssClsPrefix` property into their
.yo-rc.json. If configured, the component generator will add this string
as a prefix to className attributes.

Example:

	// .yo-rc.json
	{
	  "generator-react-webpack": {
	    "appName": "v4-latest-install",
	    "style": "css",
	    "cssmodules": false,
	    "cssClsPrefix": "myapp",
	    "postcss": false,
	    "generatedWithVersion": 4
	  }
	}

Components generated will now prepend the `myapp` prefix on their class
names, e.g.

	$ yo react-webpack:component hello
	<div className="myapp-hello-component" />
2016-11-23 12:14:21 +01:00
Chris
4f9488cb99 FEAT: Added ability to use pure components as a react base class 2016-08-10 23:33:33 +02:00
sthzg
e2add4af4d Refactored component subgen to support styles and/or cssmodules #255
This commit refactors the template structure for components to multiple
different base templates based on the required styling options:

- nostyle
- with styles
- with styles and css modules
2016-08-05 14:36:10 +02:00
Chris
14e8eb4aec Added ability to create components without styles. Fixes https://github.com/newtriks/generator-react-webpack/issues/243 2016-07-01 21:38:44 +02:00
Chris
892f771899 Added new directory options for generated components (styles are now also generated in the components folder)
Added directory options fallbacks for version 3 and below
Prepared for inclusion of css modules
2016-06-15 15:34:26 +02:00
Chris
ed4686edd0 Added support for files generated with version 4 2016-06-15 12:59:16 +02:00
Chris
9867271cbb Refactored component subgenerator to use es2015 classes 2016-06-14 10:28:09 +02:00
Chris
60bf2aae3a Adjusted generator for updated yeoman-generator to 0.22.x 2015-12-18 08:44:42 +01:00
Chris
63f1b74fe7 Added ability to create stateless components
Cleaned up unittests
2015-10-19 08:11:22 +02:00
Chris
023d937877 Added changes for version 2.0 2015-09-21 20:45:57 +02:00