Closed mbroadst closed 8 years ago
https://github.com/aurelia/validatejs/blob/master/build/tasks/watch.js#L15 <~~~ serves the sample app up - and gulp should find it properly. Just double-checked and it looked good for me so you would need to let me know what is not working and I can look at it.
@PWKad Two issues here:
start
as indicated in the READMEnpm install
on the top level directory. If you do a raw clone and just follow the "Running the sample" instructions you will result in the following error: Local gulp not found in ~/Development/aurelia/validatejs
start
. Presumably the suggested task is watch
but the watch task defined in the top level build directory is for building a plugin - not the sample app. So a gulp watch
from the sample
directory results in this:mbroadst@retinoid:sample (master=)$ gulp watch
[09:33:34] Working directory changed to ~/Development/aurelia/validatejs
[09:33:35] Using gulpfile ~/Development/aurelia/validatejs/gulpfile.js
[09:33:35] Starting 'build'...
[09:33:35] Starting 'clean'...
[09:33:35] Finished 'clean' after 43 ms
[09:33:35] Starting 'build-es2015'...
[09:33:35] Starting 'build-commonjs'...
[09:33:35] Starting 'build-amd'...
[09:33:35] Starting 'build-system'...
[09:33:38] Finished 'build-amd' after 2.7 s
[09:33:38] Finished 'build-commonjs' after 2.7 s
[09:33:38] Finished 'build-es2015' after 2.71 s
[09:33:38] Finished 'build-system' after 2.7 s
[09:33:38] Finished 'build' after 2.76 s
[09:33:38] Starting 'serve'...
[BS] Access URLs:
--------------------------------------
Local: http://localhost:3001
External: http://192.168.11.55:3001
--------------------------------------
UI: http://localhost:3002
UI External: http://192.168.11.55:3002
--------------------------------------
[BS] Serving files from: sample
[09:33:38] Finished 'serve' after 150 ms
[09:33:38] Starting 'watch'...
[09:33:38] Finished 'watch' after 128 ms
Which has then just built your sample app in amd/commonjs/requirejs/etc and not loading your app where you think you're loading it.
So I guess I just think the issue should be reopened because there is no current way to run this app. I think the sample folder needs (at very least) its own gulpfile and set of build tasks.
HTH
https://github.com/aurelia/validatejs/commit/c77f3693587a607393e73a90f01f5c39f53084f6 <~~
I'll add a note to run build-sample
as well, thanks for helping to point this out.
There was a problem with JSPM trying to incorrectly load one of the package paths that only exists in this scenario, not in a real app, that was fixed in there as well.
Alright readme updated with working instructions.
Not working for me on master as of 5 minutes ago:
git clone https://github.com/aurelia/validatejs.git
cd validatejs
npm install
cd sample
npm install
jspm install
gulp build-sample
gulp watch
Uncaught (in promise) Error: Error: XHR error (404 Not Found) loading http://localhost:3000/jspm_packages/npm/aurelia-validation@0.8.0.js
Error loading http://localhost:3000/jspm_packages/npm/aurelia-validation@0.8.0.js as
"aurelia-validation" from http://localhost:3000/aurelia-validatejs/index.js
The readme indicates you should simply need to
cd sample && npm install && jspm install && gulp start
, however there are no gulp tasks in that directory