Skip to content

Commit

Permalink
Added static directory to build step (#55)
Browse files Browse the repository at this point in the history
- add directory `src/static`
- provide README in `src/static`
- update copy run script to recursively copy the directory to
  `dist/static`
- refactor favicon to be copied via the static dir
- reference favicon from new location in `index.html`

Closes #54
  • Loading branch information
sthzg authored Aug 17, 2016
1 parent 07bfcf8 commit 0cb2072
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dist": "npm run clean && npm run copy && webpack --progress --bail --env dist -p",
"lint": "eslint ./src",
"clean": "rimraf dist/*",
"copy": "copyfiles -f ./src/index.html ./src/favicon.ico ./dist",
"copy": "copyfiles -f ./src/index.html ./dist && copyfiles -u 1 \"./src/static/**\" ./dist",
"release:major": "npm version prerelease && git push --follow-tags && npm publish --tag beta",
"release:minor": "npm version prerelease && git push --follow-tags && npm publish --tag beta",
"release:patch": "npm version prerelease && git push --follow-tags && npm publish --tag beta"
Expand Down
1 change: 1 addition & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="icon" type="image/x-icon" href="/static/favicon.ico" />
</head>
<body>
<div id="app">APPLICATION CONTENT</div>
Expand Down
6 changes: 6 additions & 0 deletions src/static/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# static

Files and directories that you put in `static` will be copied to the
`dist/static` directory during the build step. Use it to provide
arbitrary static assets that can be referenced by path in your
application.
File renamed without changes.

0 comments on commit 0cb2072

Please sign in to comment.