Added support for configuring a className prefix #310

Merged
merged 1 commit into from Nov 23, 2016

Projects

None yet

2 participants

@sthzg
Member
sthzg commented Nov 23, 2016

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" />
@sthzg sthzg Added support for configuring a className prefix
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" />
261c6e6
@coveralls
coveralls commented Nov 23, 2016 edited

Coverage Status

Coverage increased (+0.06%) to 96.078% when pulling 261c6e6 on feature/config_clsname_prefix into 01855bd on master.

@sthzg sthzg merged commit 3c55a13 into master Nov 23, 2016

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.06%) to 96.078%
Details
@sthzg sthzg deleted the feature/config_clsname_prefix branch Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment