370 Commits

Author SHA1 Message Date
sthzg
cece8d0401 Updated functionality related to PostCSS - #307
- bumped postcss and postcss-loader versions
- removed deprecated custom logic related to setting up PostCSS
- updated tests

As communicated in #307 and on the related PR from @stylesuxx on the
template repo we can use PostCSS` more recent config file feature
instead of modifying our config.

If users prompt the PostCSS question with yes, deps for postcss and
postcss-loader are added to their package.json.

The updated tests check that
- postcss and postcss-loader deps are added on PostCSS yes
- postcss and postcss-loader deps are not added on PostCSS no
- postcss.config.js is copied to the project root
2016-12-17 01:02:40 +01:00
sthzg
9c68254178 Bumped dep version for react-generator-template
v2.0.1-6 contains important updates to conf/webpack/Test.js that fix
running tests on components using css modules and a css preprocessor
(less, s(c|a)ss, stylus).
2016-11-23 15:40:54 +01:00
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
Stephan Herzog
01855bd2ed Added sub-generator setup-env #278 (#308)
This subgen creates a new Webpack config environment by

- creating conf/webpack/<EnvName>.js
- creating src/config/<env_name>.js
- requiring and exporting the new env in conf/webpack/index.js

The commit introduces a basic config template that is supposed to be populated by the generator's users. Various more fine grained subgen options can be added at a later time (e.g. prompting the user if new run scripts should be added to package.json).

The subgen's basic functionality is backed up by unit tests that check

- if files are created
- if conf/webpack/index.js contains correct import/export
2016-11-22 19:38:13 +01:00
Chris
a2bd75a83b V4 -- Updates to support PostCSS installation
* Updated tessts to successfully run against current master of the template
* Updated postcss attachement to new webpack config. Adjusted tests.
* Updated dependencies
* Use newest template
* Updated Esprima
2016-11-22 12:35:31 +01:00
Chris
b581e5bd02 Added support for cssmodules when setting up projects. closes #265 2016-08-24 01:13:48 +02:00
Chris
90f516c149 Added coverage badge 2016-08-23 23:21:56 +02:00
Chris
b45c47ce9e Fix: Updated coverage to use lcov as default reporter 2016-08-23 23:18:32 +02:00
Chris
e6e9906d19 Added coveralls.io 2016-08-23 23:11:52 +02:00
Chris
efcf3cdebf Added back postcss 2016-08-23 22:54:34 +02:00
Stephan Herzog
2a2f4cf4df Refactored test templates to use inline functions (#276)
Closes #275
2016-08-15 12:37:54 +02:00
Chris
4f9488cb99 FEAT: Added ability to use pure components as a react base class 2016-08-10 23:33:33 +02:00
Chris
2936d09fa5 CHORE: Updated package and readme urls to new repo position. Fixes #269 2016-08-10 22:04:22 +02:00
Chris
befa0613fc Merge pull request #268 from sthzg/feature/gh_issue_255
Refactored component subgen to support styles and/or cssmodules #255
2016-08-09 23:09:05 +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
389cc94bf4 Merge pull request #254 from sthzg/feature/gh_issue_#253
Prevent two consecutive slashes in test imports #253
2016-08-01 07:31:00 +02:00
sthzg
dcee97ec65 Proposed solution for #253
Wrapped Node's path.normalize() around paths that have
`componentPartPath` as a part segment. For non-namespaced components
this segment can be empty which leads to two consecutive slashes.

Updated test suite to assert against the updated import statements
in various files.
2016-07-11 01:13:46 +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
4107c514a4 4.0.1-1 v4.0.1-1 2016-06-30 09:25:00 +02:00
Chris
ddf8ee9207 Added utils to files array, removed unneeded parts of readme 2016-06-30 09:24:52 +02:00
Chris
3e339da2a2 Merge pull request #249 from sthzg/master
Fixes no-trailing-spaces error in components Base.js #244
2016-06-30 07:56:47 +02:00
sthzg
d9ddf3cf10 Fixes no-trailing-spaces error in components Base.js #244 2016-06-24 18:22:40 +02:00
Chris
f64ae8a4d7 4.0.1-0 v4.0.1-0 2016-06-15 15:40:36 +02:00
Chris
3addfcb997 Reverted 4.0.1 release. Sorry :( 2016-06-15 15:38:43 +02:00
Chris
d26f965823 Fixed release scripts. 2016-06-15 15:38:02 +02:00
Chris
fc129f9058 4.0.1 2016-06-15 15:35:26 +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
1ad51f4166 Merge pull request #237 from JimTheMan/patch-1
Update README.md
2016-06-13 07:46:23 +02:00
Jim Lynch
99569fc68e Update README.md 2016-06-12 12:05:16 -04:00
Chris
663a49369b Added basic changes for v4.0 (base generator class refactoring) 2016-05-27 12:01:50 +02:00
Chris
84b576548b 3.3.2 v3.3.2 2016-05-17 09:48:52 +02:00
Chris
d27d5ffcbf Emerg: Reverted 3.3.1 2016-05-17 09:48:45 +02:00
Chris
84919affc9 3.3.1 v3.3.1 2016-05-17 08:02:47 +02:00
Chris
cc0172086f Chore: Added new version of dependencies 2016-05-17 08:02:17 +02:00
Chris
0f6d9158be Merge pull request #211 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2016-04-28 13:26:10 +02:00
The Gitter Badger
2de8d22b91 Add Gitter badge 2016-04-28 11:19:16 +00:00
Chris
35ef93138c 3.3.0 v3.3.0 2016-03-29 23:24:14 +02:00
Chris
4e698c51b4 Added new changelog for 3.3.0 2016-03-29 23:09:07 +02:00
Chris
832907f2fd Added minor es2015 tweaks 2016-03-29 23:01:42 +02:00
Chris
6344984d65 Added ability to save generator version for future updates 2016-03-29 23:00:55 +02:00
Chris
6b9e24c85a 3.2.4 v3.2.4 2016-03-02 11:56:34 +01:00
Chris
561e072a9c Adjusted generated unit tests 2016-03-02 11:56:12 +01:00
Chris
56d6b9cd48 3.2.3 v3.2.3 2016-02-23 22:14:34 +01:00
Chris
43f3bce786 Added changelog for 3.2.3 (adjusted postcss config to work with new react-webpack-template). 2016-02-23 22:14:02 +01:00
Chris
f6327e1904 Merge pull request #188 from thewtex/grammar
Grammar improvement to the style prompt.
2016-01-25 08:33:00 +01:00
Matt McCormick
bd5748bb89 Grammar improvement to the style prompt. 2016-01-24 10:14:47 -05:00
Chris
782a38b685 3.2.2 v3.2.2 2016-01-13 07:57:00 +01:00
Chris
946775a22f Fix: Set correct indention for generated unit tests 2016-01-13 07:56:49 +01:00