Skip to content

Commit

Permalink
refactor(project): move static files out of src
Browse files Browse the repository at this point in the history
  • Loading branch information
David Zukowski committed Dec 2, 2016
1 parent 1f24fb0 commit 2e5a5c1
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ The application structure presented in this boilerplate is **fractal**, where fu
.
├── bin # Build/Start scripts
├── config # Project and build configurations
├── public # Static public assets (not imported anywhere in source code)
├── server # Express application that provides webpack middleware
│ └── main.js # Server application entry point
├── src # Application source code
Expand All @@ -115,7 +116,6 @@ The application structure presented in this boilerplate is **fractal**, where fu
│ │ ├── container # Connect components to actions and store
│ │ ├── modules # Collections of reducers/constants/actions
│ │ └── routes ** # Fractal sub-routes (** optional)
│ ├── static # Static assets (not imported anywhere in source code)
│ ├── store # Redux-specific pieces
│ │ ├── createStore.js # Create and instrument redux store
│ │ └── reducers.js # Reducer registry and injection
Expand Down
2 changes: 1 addition & 1 deletion bin/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const compile = () => {
throw new Error('Config set to fail on warning, exiting with status code "1".')
}
debug('Copying static assets to dist folder.')
fs.copySync(project.paths.client('static'), project.paths.dist())
fs.copySync(project.paths.public(), project.paths.dist())
})
.then(() => {
debug('Compilation completed successfully.')
Expand Down
2 changes: 2 additions & 0 deletions config/project.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const config = {
path_base : path.resolve(__dirname, '..'),
dir_client : 'src',
dir_dist : 'dist',
dir_public : 'public',
dir_server : 'server',
dir_test : 'tests',

Expand Down Expand Up @@ -112,6 +113,7 @@ function base () {
config.paths = {
base : base,
client : base.bind(null, config.dir_client),
public : base.bind(null, config.dir_public),
dist : base.bind(null, config.dir_dist)
}

Expand Down
2 changes: 1 addition & 1 deletion config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ webpackConfig.plugins = [
new HtmlWebpackPlugin({
template : project.paths.client('index.html'),
hash : false,
favicon : project.paths.client('static/favicon.ico'),
favicon : project.paths.public('favicon.ico'),
filename : 'index.html',
inject : 'body',
minify : {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 2e5a5c1

Please sign in to comment.