Skip to content

Commit

Permalink
chore(devenv): remove JS build from dev server prereq (#564)
Browse files Browse the repository at this point in the history
As dev server code (server.js) itself runs WebPack to build JS code.

Also changed the route of dev env's static content so that WebPack dev middleware can handle the route.
  • Loading branch information
asudoh authored and marijohannessen committed Feb 14, 2018
1 parent a4246fd commit afdedb8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions demo/views/demo-live.dust
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Carbon Components</title>
<link rel="stylesheet" href="/demo.css">
<link rel="stylesheet" href="/demo/demo.css">
<style>
.offleft {
position: absolute;
Expand All @@ -29,7 +29,7 @@

<!-- Scripts -->
<!-- <script src="/carbon-components.min.js"></script> -->
<script src="/demo.js"></script>
<script src="/demo/demo.js"></script>
<!-- Disable Auto Init with this flag -->
<!-- true = JavaScript will not initialize automatically -->
<!-- false = JavaScript will initialize automatically -->
Expand Down
4 changes: 2 additions & 2 deletions demo/views/demo-nav.dust
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Carbon Components</title>
<link rel="stylesheet" href="/demo.css">
<link rel="stylesheet" href="/demo/demo.css">
<style>
.offleft {
position: absolute;
Expand All @@ -24,6 +24,6 @@
var componentItems = {componentItems|js|s};
var docItems = {docItems|js|s};
</script>
<script src="/demo.js"></script>
<script src="/demo/demo.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const axe = require('gulp-axe-webdriver');
* BrowserSync
*/

gulp.task('browser-sync', ['build:dev'], cb => {
gulp.task('browser-sync', ['sass:dev'], cb => {
let started;
nodemon({
script: './server.js',
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fractal.docs.set('path', path.join(__dirname, 'docs'));
app.engine('dust', adaro.dust());
app.set('view engine', 'dust');
app.set('views', path.resolve(__dirname, 'demo/views'));
app.use(express.static('demo'));
app.use('/demo', express.static('demo'));
app.use(express.static('src'));
app.use(express.static('scripts'));
app.use('/docs/js', express.static('docs/js'));
Expand Down

0 comments on commit afdedb8

Please sign in to comment.