Skip to content
This repository was archived by the owner on Sep 11, 2018. It is now read-only.

Commit 2e5a5c1

Browse files
author
David Zukowski
committed
refactor(project): move static files out of src
1 parent 1f24fb0 commit 2e5a5c1

File tree

7 files changed

+5
-3
lines changed

7 files changed

+5
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ The application structure presented in this boilerplate is **fractal**, where fu
9292
.
9393
├── bin # Build/Start scripts
9494
├── config # Project and build configurations
95+
├── public # Static public assets (not imported anywhere in source code)
9596
├── server # Express application that provides webpack middleware
9697
│ └── main.js # Server application entry point
9798
├── src # Application source code
@@ -115,7 +116,6 @@ The application structure presented in this boilerplate is **fractal**, where fu
115116
│ │ ├── container # Connect components to actions and store
116117
│ │ ├── modules # Collections of reducers/constants/actions
117118
│ │ └── routes ** # Fractal sub-routes (** optional)
118-
│ ├── static # Static assets (not imported anywhere in source code)
119119
│ ├── store # Redux-specific pieces
120120
│ │ ├── createStore.js # Create and instrument redux store
121121
│ │ └── reducers.js # Reducer registry and injection

bin/compile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const compile = () => {
4242
throw new Error('Config set to fail on warning, exiting with status code "1".')
4343
}
4444
debug('Copying static assets to dist folder.')
45-
fs.copySync(project.paths.client('static'), project.paths.dist())
45+
fs.copySync(project.paths.public(), project.paths.dist())
4646
})
4747
.then(() => {
4848
debug('Compilation completed successfully.')

config/project.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const config = {
1717
path_base : path.resolve(__dirname, '..'),
1818
dir_client : 'src',
1919
dir_dist : 'dist',
20+
dir_public : 'public',
2021
dir_server : 'server',
2122
dir_test : 'tests',
2223

@@ -112,6 +113,7 @@ function base () {
112113
config.paths = {
113114
base : base,
114115
client : base.bind(null, config.dir_client),
116+
public : base.bind(null, config.dir_public),
115117
dist : base.bind(null, config.dir_dist)
116118
}
117119

config/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ webpackConfig.plugins = [
5858
new HtmlWebpackPlugin({
5959
template : project.paths.client('index.html'),
6060
hash : false,
61-
favicon : project.paths.client('static/favicon.ico'),
61+
favicon : project.paths.public('favicon.ico'),
6262
filename : 'index.html',
6363
inject : 'body',
6464
minify : {
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)