-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added snapguidist generated folder to git ignore list * Chore: Updated project deps * Chore: Added dot files for npm, yarn and editorconfig * Feat: Added snapguidist config module * Feat: Updated example to use the new config module * Chore: fixed project deps * Tests: Updated test to support the new deps of the project * Chore: Updated example deps * Chore: Updated react-styleguidist to master until a new version is released * Refactor: Moved files in more specialized directories * Chore: updated build script to pre-create folders to avoid cssnano errors * Chore: Added git hooks support with opt-cli options to let developers in control * Tests: Fixed test to support new folder structure * Refactor: Improved scaffold and added support for styleguidist server hook * Chore: updated styleguidist deps to play nice with yarn * Chore: Updated to latest release of react-styleguisit (4.5.0) * Chore: Added .opt-in and .opt-out files to git's ignore list * Refactor: Moved 'style.css' back to src/dist folder * Chore: Removed unnecessary dependency to mkdirp * Chore: Fixed a wrong expression in 'prepush' command * Refactor: Changed and improved naming of several files and folders * Refactor: Updated modules consumed by react-styleguidist to use commonJS exports and imports * Refactor: Improved snapguidist webapck config to work in a real environment * Style: eslint fixes * Chore: added comma-dangle rule to eslint * Chore: added babel-preset-stage-0 and cross-env modules * Refactor: Updated example to work properly both standalone and as snapguidist dev environment * Chore: Updated project to use src as main source and to run the example in dev mode * Chore: Removed build process and related dependencies * Refactor: Removed need of an environment variable to run DEV mode * Refactor: Improved example to expose 2 different styleguide config files for dev and normal mode * Chore: Updated start command for DEV mode to use the new example configuration file * Chore: Removed cross-env dependency * Chore: Moved Express from deps to dev-deps * Chore: Removed babel-cli dependency * Refactor: All snapguidist endpoints now are under 'snapguidist' path * Docs: Updated project's readme * Chore: Bumped project version to 1.0.0 * Docs: Fixed some texts * Refactor: Minor tweaks to clean up the project * Docs: Updated project's readme with Michele's suggestions
- Loading branch information
1 parent
574d465
commit af8b29f
Showing
35 changed files
with
1,297 additions
and
799 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# EditorConfig helps developers define and maintain | ||
# consistent coding styles between different editors and IDEs. | ||
|
||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = false | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
dist | ||
.opt.in | ||
.opt-out | ||
.snapguidist | ||
node_modules | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
save-exact=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
save-prefix false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["es2015", "react"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const path = require('path') | ||
const snapguidist = require(path.join(__dirname, '..', 'src', 'index')) | ||
|
||
module.exports = snapguidist({ | ||
title: '[dev] Snapguidist Styleguide', | ||
|
||
components: 'src/components/**/[A-Z]*.js', | ||
|
||
updateWebpackConfig(webpackConfig) { | ||
webpackConfig.devtool = 'source-map' | ||
|
||
const sourceFolder = path.resolve(__dirname, 'src') | ||
webpackConfig.module.loaders.push({ | ||
test: /\.jsx?$/, | ||
include: sourceFolder, | ||
loader: 'babel', | ||
}) | ||
|
||
return webpackConfig | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,19 @@ | ||
const path = require('path') | ||
const snapguidist = require('snapguidist') | ||
|
||
module.exports = { | ||
title: 'My Great Style Guide', | ||
module.exports = snapguidist({ | ||
title: 'Snapguidist Styleguide', | ||
|
||
components: './src/**/*.js', | ||
components: 'src/components/**/[A-Z]*.js', | ||
|
||
updateWebpackConfig(webpackConfig) { | ||
webpackConfig.module.loaders.push( | ||
{ | ||
test: /\.jsx?$/, | ||
exclude: /node_modules/, | ||
loader: 'babel', | ||
query: { | ||
presets: [ | ||
'babel-preset-es2015', | ||
'babel-preset-react', | ||
].map(require.resolve), | ||
}, | ||
}, | ||
{ | ||
test: /\.css$/, | ||
exclude: /node_modules/, | ||
loaders: ['style', 'css'], | ||
} | ||
) | ||
|
||
webpackConfig.resolve.modulesDirectories = ['./example/node_modules', './node_modules'] | ||
|
||
webpackConfig.entry.push(path.join(__dirname, '../src/client/styles.css')) | ||
|
||
webpackConfig.resolve.alias['rsg-components/Playground/PlaygroundRenderer'] = path.join(__dirname, '../src/client/PlaygroundRenderer') | ||
webpackConfig.resolve.alias['rsg-components/Preview'] = path.join(__dirname, '../src/client/Preview') | ||
const sourceFolder = path.resolve(__dirname, 'src') | ||
webpackConfig.module.loaders.push({ | ||
test: /\.jsx?$/, | ||
include: sourceFolder, | ||
loader: 'babel', | ||
}) | ||
|
||
return webpackConfig | ||
}, | ||
|
||
} | ||
}) |
Oops, something went wrong.