From 34308702126610eb86226fe3858f85656677e5ed Mon Sep 17 00:00:00 2001 From: Joe Frambach Date: Sun, 9 Aug 2015 18:35:35 -0700 Subject: [PATCH] Remove hash from url. Fix routing to page. Fix sass. --- .gitignore | 3 ++- gulp/tasks/styles.js | 2 +- gulp/tasks/webserver.js | 3 ++- index.html | 4 +-- npm-debug.log | 37 -------------------------- src/js/react/components/BeanProfile.js | 2 +- src/js/react/router.js | 2 +- 7 files changed, 9 insertions(+), 44 deletions(-) delete mode 100644 npm-debug.log diff --git a/.gitignore b/.gitignore index 572ac37..919a24a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /node_modules /.idea /.sass-cache -/_projectfiles \ No newline at end of file +/_projectfiles +npm-debug.log diff --git a/gulp/tasks/styles.js b/gulp/tasks/styles.js index 8e243d6..24849ff 100644 --- a/gulp/tasks/styles.js +++ b/gulp/tasks/styles.js @@ -15,7 +15,7 @@ var autoprefixerCompatibility = gulp.task('styles', function() { return gulp.src('src/sass/styles.scss') - .pipe(sass({ style: 'expanded', "sourcemap=none": true })) + .pipe(sass({ style: 'expanded', sourcemap: false })) .pipe(autoprefixer({browsers: autoprefixerCompatibility, cascade: false})) .pipe(gulp.dest('public/stylesheets')) .pipe(rename({suffix: '.min'})) diff --git a/gulp/tasks/webserver.js b/gulp/tasks/webserver.js index 1bf06e1..c85dc6c 100644 --- a/gulp/tasks/webserver.js +++ b/gulp/tasks/webserver.js @@ -3,7 +3,8 @@ var connect = require('gulp-connect'); var webserverOptions = { livereload : true, - root : [__dirname+"/../../"] + root : [__dirname+"/../../public/"], + fallback: __dirname+"/../../index.html" }; gulp.task('webserver', function() { diff --git a/index.html b/index.html index 0161608..28807d2 100644 --- a/index.html +++ b/index.html @@ -4,9 +4,9 @@ alt react-router example - + - + \ No newline at end of file diff --git a/npm-debug.log b/npm-debug.log deleted file mode 100644 index bdae9fe..0000000 --- a/npm-debug.log +++ /dev/null @@ -1,37 +0,0 @@ -0 info it worked if it ends with ok -1 verbose cli [ 'node', -1 verbose cli 'C:\\Users\\Paul\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js', -1 verbose cli 'start' ] -2 info using npm@2.3.0 -3 info using node@v0.10.36 -4 verbose run-script [ 'prestart', 'start', 'poststart' ] -5 info prestart alt-react-router-example@1.0.0 -6 info start alt-react-router-example@1.0.0 -7 verbose unsafe-perm in lifecycle true -8 info alt-react-router-example@1.0.0 Failed to exec start script -9 verbose stack Error: alt-react-router-example@1.0.0 start: `gulp liveserver` -9 verbose stack Exit status 8 -9 verbose stack at EventEmitter. (C:\Users\Paul\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:213:16) -9 verbose stack at EventEmitter.emit (events.js:98:17) -9 verbose stack at ChildProcess. (C:\Users\Paul\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:14:12) -9 verbose stack at ChildProcess.emit (events.js:98:17) -9 verbose stack at maybeClose (child_process.js:766:16) -9 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:833:5) -10 verbose pkgid alt-react-router-example@1.0.0 -11 verbose cwd D:\Dev\Flux\simple-alt -12 error Windows_NT 6.2.9200 -13 error argv "node" "C:\\Users\\Paul\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start" -14 error node v0.10.36 -15 error npm v2.3.0 -16 error code ELIFECYCLE -17 error alt-react-router-example@1.0.0 start: `gulp liveserver` -17 error Exit status 8 -18 error Failed at the alt-react-router-example@1.0.0 start script 'gulp liveserver'. -18 error This is most likely a problem with the alt-react-router-example package, -18 error not with npm itself. -18 error Tell the author that this fails on your system: -18 error gulp liveserver -18 error You can get their info via: -18 error npm owner ls alt-react-router-example -18 error There is likely additional logging output above. -19 verbose exit [ 1, true ] diff --git a/src/js/react/components/BeanProfile.js b/src/js/react/components/BeanProfile.js index 8070797..cfcb2d1 100644 --- a/src/js/react/components/BeanProfile.js +++ b/src/js/react/components/BeanProfile.js @@ -24,7 +24,7 @@ var BeanProfile = React.createClass({ return (
- +

The {this.props.beanItem.bean_name} bean

{this.props.beanItem.bean_description}
diff --git a/src/js/react/router.js b/src/js/react/router.js index 38d95d1..61851a9 100644 --- a/src/js/react/router.js +++ b/src/js/react/router.js @@ -2,7 +2,7 @@ var ReactRouter = require('react-router'); var routes = require('./routes'); var router = ReactRouter.create({ - location : ReactRouter.HashLocation, + location : ReactRouter.HistoryLocation, routes : routes });