mirror of
https://github.com/wassname/generator-react-webpack.git
synced 2026-08-30 11:23:47 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56d6b9cd48 | ||
|
|
43f3bce786 | ||
|
|
f6327e1904 | ||
|
|
bd5748bb89 | ||
|
|
782a38b685 | ||
|
|
946775a22f |
@@ -1,5 +1,14 @@
|
||||
# generator-react-webpack - Changelog
|
||||
|
||||
## 3.2.3
|
||||
|
||||
1. Adjusted postcss to work with react-webpack-template 1.4 upwards
|
||||
2. Improved styling output (provided by [thewtex](https://github.com/thewtex))
|
||||
|
||||
## 3.2.2
|
||||
|
||||
1. Cleaned up formatting of unit tests
|
||||
|
||||
## 3.2.1
|
||||
|
||||
1. Updated tests for new version of react-webpack-template
|
||||
|
||||
@@ -138,7 +138,7 @@ module.exports = generator.Base.extend({
|
||||
install: function() {
|
||||
if(this.postcss) {
|
||||
let postcss = require('./postcss');
|
||||
postcss.write(path.join(this.destinationRoot(), 'cfg/base.js'));
|
||||
postcss.write(path.join(this.destinationRoot(), 'cfg/defaults.js'));
|
||||
}
|
||||
|
||||
if(!this.options['skip-install']) {
|
||||
|
||||
@@ -11,7 +11,7 @@ module.exports = [
|
||||
{
|
||||
type: 'list',
|
||||
name: 'style',
|
||||
message: 'Which styles language you want to use?',
|
||||
message: 'Which style language do you want to use?',
|
||||
choices: utils.config.getChoices('style'),
|
||||
default: utils.config.getDefaultChoice('style')
|
||||
},
|
||||
|
||||
@@ -10,13 +10,13 @@ import createComponent from 'helpers/shallowRenderHelper';
|
||||
import <%= component.className %> from '<%= component.webpackPath %>';
|
||||
|
||||
describe('<%= component.className %>', () => {
|
||||
let component;
|
||||
let component;
|
||||
|
||||
beforeEach(() => {
|
||||
component = createComponent(<%= component.className %>);
|
||||
});
|
||||
beforeEach(() => {
|
||||
component = createComponent(<%= component.className %>);
|
||||
});
|
||||
|
||||
it('should have its component name as default className', () => {
|
||||
expect(component.props.className).to.equal('<%= style.className %>');
|
||||
});
|
||||
it('should have its component name as default className', () => {
|
||||
expect(component.props.className).to.equal('<%= style.className %>');
|
||||
});
|
||||
});
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "generator-react-webpack",
|
||||
"version": "3.2.1",
|
||||
"version": "3.2.3",
|
||||
"description": "Yeoman generator for using React with Webpack via Babel",
|
||||
"keywords": [
|
||||
"yeoman-generator",
|
||||
|
||||
@@ -65,6 +65,7 @@ describe('react-webpack:app', () => {
|
||||
|
||||
assert.file([
|
||||
'cfg/base.js',
|
||||
'cfg/defaults.js',
|
||||
'cfg/dev.js',
|
||||
'cfg/dist.js',
|
||||
'cfg/test.js',
|
||||
@@ -159,6 +160,7 @@ describe('react-webpack:app non-default-prompts', () => {
|
||||
|
||||
assert.file([
|
||||
'cfg/base.js',
|
||||
'cfg/defaults.js',
|
||||
'cfg/dev.js',
|
||||
'cfg/dist.js',
|
||||
'cfg/test.js',
|
||||
@@ -169,16 +171,16 @@ describe('react-webpack:app non-default-prompts', () => {
|
||||
|
||||
it('should insert the postcss loader into the style pipes', () => {
|
||||
|
||||
assert.fileContent('cfg/base.js', 'loader: \'style-loader!css-loader!postcss-loader\'');
|
||||
assert.fileContent('cfg/base.js', 'loader: \'style-loader!css-loader!postcss-loader!sass-loader?outputStyle=expanded&indentedSyntax\'');
|
||||
assert.fileContent('cfg/base.js', 'loader: \'style-loader!css-loader!postcss-loader!sass-loader?outputStyle=expanded\'');
|
||||
assert.fileContent('cfg/base.js', 'loader: \'style-loader!css-loader!postcss-loader!less-loader\'');
|
||||
assert.fileContent('cfg/base.js', 'loader: \'style-loader!css-loader!postcss-loader!stylus-loader\'');
|
||||
assert.fileContent('cfg/defaults.js', 'loader: \'style-loader!css-loader!postcss-loader\'');
|
||||
assert.fileContent('cfg/defaults.js', 'loader: \'style-loader!css-loader!postcss-loader!sass-loader?outputStyle=expanded&indentedSyntax\'');
|
||||
assert.fileContent('cfg/defaults.js', 'loader: \'style-loader!css-loader!postcss-loader!sass-loader?outputStyle=expanded\'');
|
||||
assert.fileContent('cfg/defaults.js', 'loader: \'style-loader!css-loader!postcss-loader!less-loader\'');
|
||||
assert.fileContent('cfg/defaults.js', 'loader: \'style-loader!css-loader!postcss-loader!stylus-loader\'');
|
||||
});
|
||||
|
||||
it('should append the postcss function to the base config', () => {
|
||||
|
||||
assert.fileContent('cfg/base.js', ',\n postcss: function () {\n return [];\n }');
|
||||
assert.fileContent('cfg/defaults.js', ',\n postcss: function () {\n return [];\n }');
|
||||
});
|
||||
|
||||
it('should generate required source files', () => {
|
||||
|
||||
Reference in New Issue
Block a user