dbankier / jast Goto Github PK
View Code? Open in Web Editor NEWJAST is a boilerplate with a mash of tools for rapid Alloy development
JAST is a boilerplate with a mash of tools for rapid Alloy development
The build process is hanging for me after a file is changed. I get the following output
OK
>> File "src/controllers/index.js" changed.
Running "babel:dist" (babel) task
Running "watch:javascripts" (watch) task
Completed in 0.280s at Mon Jun 01 2015 17:43:02 GMT+0100 (BST) - Waiting...
... and then nothing. This is happening every time for me. I have to ctrl+c restart the build every time.
Environment:
Ti SDK 4.0.0.v20150512005012
Ti CLI 3.4.2
Alloy 1.6.0
TiShadow 2.8.2
Building for iOS 8.3
Xcode 6.3.2
Node 0.10.38
Mac OSX 10.10.3
I should mention that I'm having a lot of trouble with TiShadow in general and not sure why because it all used to work fine.
I've been trying to get grunt to update the app when I modify my i18n/en/strings.xml
.
Simply adding a mask to the watch files list triggers the tasks, but it doesn't create any 'changes' for tishadow.
So I'm not sure if this is to be solved by some clever grunt tasks, or in tiShadow itself.
Steps to reproduce:
Gulpfile.js
<sdk-version>3.5.0.GA</sdk-version>
to <sdk-version>3.5.1.GA</sdk-version>
in tiapp.xml
When I'm running with grunt dev -p ios
and press the login button in the simulator, I get the following printout in the terminal:
[INFO] [iphone, 8.3, 192.168.1.68] [
"OK"
]
[INFO] [iphone, 8.3, 192.168.1.68] [
"OK"
]
Notice that I get it twice.
And if I add Ti.API.debug('index.js runned!');
as line 1 in src/controllers/index.js
I get that printout twice as well. It looks like this:
...
[INFO] [iphone, 8.3, 192.168.1.68] Requiring: /Users/emiloberg/Library/Developer/CoreSimulator/Devices/11146D86-F1A5-468C-9D0E-8231FF0F6B72/data/Containers/Data/Application/89780833-3946-4279-885B-1123B90B53B7/Documents/JAST/iphone/alloy/controllers/index.js
[DEBUG] [iphone, 8.3, 192.168.1.68] index.js runned!
[INFO] [iphone, 8.3, 192.168.1.68] Requiring: /Users/emiloberg/Library/Developer/CoreSimulator/Devices/11146D86-F1A5-468C-9D0E-8231FF0F6B72/data/Containers/Data/Application/89780833-3946-4279-885B-1123B90B53B7/Documents/JAST/iphone/nano.js
[INFO] [iphone, 8.3, 192.168.1.68] JAST launched.
[INFO] [iphone, 8.3, 192.168.1.68] Requiring: /Users/emiloberg/Library/Developer/CoreSimulator/Devices/11146D86-F1A5-468C-9D0E-8231FF0F6B72/data/Containers/Data/Application/89780833-3946-4279-885B-1123B90B53B7/Documents/JAST/iphone/alloy/controllers/BaseController.js
[INFO] [iphone, 8.3, 192.168.1.68] Requiring: /Users/emiloberg/Library/Developer/CoreSimulator/Devices/11146D86-F1A5-468C-9D0E-8231FF0F6B72/data/Containers/Data/Application/89780833-3946-4279-885B-1123B90B53B7/Documents/JAST/iphone/alloy/widgets/yy.alert/controllers/widget.js
[INFO] [iphone, 8.3, 192.168.1.68] Requiring: /Users/emiloberg/Library/Developer/CoreSimulator/Devices/11146D86-F1A5-468C-9D0E-8231FF0F6B72/data/Containers/Data/Application/89780833-3946-4279-885B-1123B90B53B7/Documents/JAST/iphone/alloy/controllers/index.js
[DEBUG] [iphone, 8.3, 192.168.1.68] index.js runned!
...
It looks like a lot of things is required twice. See the full log: https://gist.github.com/emiloberg/76619f49f6ff64c97d74#file-gistfile1-sh-L244-L273
Any idea why this is?
6to5 changed its name to Babel, see full announcement here: http://babeljs.io/blog/2015/02/15/not-born-to-die/
Hiya, got JAST running nicely on my setup with all your recent changes (thanks!), but the only part I am failing at now is running specs.
If I do it from a fresh clone of JAST, I get..
> [ERROR] Invalid test library, please choose from: jasmine, mocha-should or mocha-chai
>> Error
So, I go into the Gruntfile.js and add.. type: "jasmine"
to the tishadow options, and I don't get errors anymore, but I don't see anything actually happening - no tests are ran, and I can't see anything actually running. This is using the grunt test -p ios
command. Here is the full output:
± |master ✗| → grunt test -p ios
Running "tishadow:clear" (tishadow) task
Running "copy:alloy" (copy) task
Created 45 directories, copied 157 files
Running "jade:compile" (jade) task
File "app/views/index.xml" created.
Running "stss:compile" (stss) task
File "app/styles/app.tss" created.
File "app/styles/index.tss" created.
Running "babel:dist" (babel) task
Note: The code generator has deoptimised the styling of "src/lib/nano.js" as it exceeds the max of "100KB".
Running "tishadow:spec" (tishadow) task
TiShadow REPL
launchApp(appName), closeApp(), runSpec() and clearCache() methods available.
require(), Ti.include() and assests are relative the running app.
> [INFO] Beginning Build Process
[INFO] Compiling Alloy for ios
[INFO] [config.json] regenerating CFG.js from config.json...
[INFO] ----- MVC GENERATION -----
[INFO] [global style] loading from cache...
[INFO] [view.xml] nl.fokkezb.loading view processing...
[INFO] style: "view.tss"
[INFO] view: "view.xml"
[INFO] controller: "view.js"
[INFO] created: "Resources/iphone/alloy/widgets/nl.fokkezb.loading/controllers/view.js"
[INFO] created: "Resources/iphone/alloy/widgets/nl.fokkezb.loading/styles/view.js"
[INFO] [widget.xml] nl.fokkezb.loading view processing...
[INFO] view: "widget.xml"
[INFO] controller: "widget.js"
[INFO] created: "Resources/iphone/alloy/widgets/nl.fokkezb.loading/controllers/widget.js"
[INFO] created: "Resources/iphone/alloy/widgets/nl.fokkezb.loading/styles/widget.js"
[INFO] [window.xml] nl.fokkezb.loading view processing...
[INFO] style: "window.tss"
[INFO] view: "window.xml"
[INFO] controller: "window.js"
[INFO] created: "Resources/iphone/alloy/widgets/nl.fokkezb.loading/controllers/window.js"
[INFO] created: "Resources/iphone/alloy/widgets/nl.fokkezb.loading/styles/window.js"
[INFO] [widget.xml] yy.alert view processing...
[INFO] style: "widget.tss"
[INFO] view: "widget.xml"
[INFO] controller: "widget.js"
[INFO] created: "Resources/iphone/alloy/widgets/yy.alert/controllers/widget.js"
[INFO] created: "Resources/iphone/alloy/widgets/yy.alert/styles/widget.js"
[INFO] [index.xml] view processing...
[INFO] style: "index.tss"
[INFO] view: "index.xml"
[INFO] controller: "index.js"
[INFO] created: "Resources/iphone/alloy/controllers/index.js"
[INFO] created: "Resources/iphone/alloy/styles/index.js"
[INFO]
[INFO]
[INFO] [app.js] using cached app.js...
[INFO]
[INFO] ----- OPTIMIZING -----
[INFO] - iphone/XHR.js
[INFO] - iphone/alloy.js
[INFO] - iphone/nano.js
[INFO] - iphone/alloy/sync/localStorage.js
[INFO] - iphone/alloy/sync/properties.js
[INFO] - iphone/alloy/sync/sql.js
[INFO] - iphone/alloy/widgets/nl.fokkezb.loading/controllers/view.js
[INFO] - iphone/alloy/widgets/nl.fokkezb.loading/controllers/widget.js
[INFO] - iphone/alloy/widgets/nl.fokkezb.loading/controllers/window.js
[INFO] - iphone/alloy/widgets/nl.fokkezb.loading/styles/view.js
[INFO] - iphone/alloy/widgets/nl.fokkezb.loading/styles/widget.js
[INFO] - iphone/alloy/widgets/nl.fokkezb.loading/styles/window.js
[INFO] - iphone/alloy/widgets/yy.alert/controllers/widget.js
[INFO] - iphone/alloy/widgets/yy.alert/styles/widget.js
[INFO]
[INFO] Alloy compiled in 2.85765s
[INFO] 4 file(s) bundled.
[INFO] BUNDLE sent.
Thanks for any help you might be able to give!
Running grunt dev -p ios
with:
var ti_args= {
ios: ["-p","ios","-T", "simulator", "--device-id","xxx-xxx-xxx-xxx-xxx", "--log-level", "trace"]
};
results in:
[INFO] Alloy compiled in 1.44946s
[WARN] Nothing to update.
titanium build --log-level info --platform ios --project-dir . --no-banner --no-progress-bars --no-prompt -p ios -T simulator --device-id 1483CA77-1291-43A7-A246-F2F6E8C15FC8 --log-level trace --appify
[ERROR] Invalid "--log-level" value "info,trace"
Accepted values:
trace
debug
info
warn
error
For help, run: titanium help build
Done, without errors.
Something (I suspect grunt-titanium) is adding --log-level info
by default.
Not sure if the problem is JAST or over at grunt-titanium.
The readme doesn't really mention how this would be achieved. The TIShadow docs don't really shed any light on this either and JAST takes care of the TiShadow aspects using grunt so I'm not entirely sure what's going on under the hood.
Also running grunt dev -p ios
doesn't work but grunt dev -p iphone
does, it might be worth reworking the readme to make sure it matches how the stack should be used and to be a bit friendlier to new users.
I'm struggling to get JAST working with any version of Node from 0.11.x upwards, The latest version I can get the stack to work with is 0.10.37.
It looks like the problem is with the STSS dependency but before I raise an issue over there, I wanted to make sure that it isn't just me being silly.
So, has anyone got JAST to work with a version of Node higher than 0.10.37?
Hi,
Running the gruntfile against alloy 1.2 gives me the following error, when building any changes:
Error: [ERROR] You must define a target platform for the alloy compile command
[ERROR] Ex. "alloy compile --config platform=ios"
do you know how I can go about fixing this? TiShadow + Grunt looks like a very powerful tool.
Being playing with Typescript and starting to like it.
Curious what people think of replacing babel with Typescript.
I could support both, compiling based on extension...
(I guess it would make the project TAST instead of JAST...)
Hi, I am getting an error when trying to run the command grunt dev -p ios
and anything that's not grunt build
or ti build -p ios --appify
. The explicit ti build just gives me a screen with tiShadow, but not the actual application running. the application - fresh clone, globally installed as well as locally installed alloy/ti shadow/grunt-cli, as well as those in package.json
[INFO] [index.xml] view processing...
[INFO] style: "index.tss"
[INFO] view: "index.xml"
[INFO] controller: "index.js"
/usr/local/lib/node_modules/alloy/Alloy/commands/compile/sourceMapper.js:99
throw e;
^
Error
at new JS_Parse_Error (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:189:18)
at js_error (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:197:11)
at croak (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:656:9)
at token_error (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:664:9)
at unexpected (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:670:9)
at expr_atom (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:1166:9)
at maybe_unary (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:1327:19)
at expr_op (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:1349:33)
at expr_ops (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:1362:16)
at maybe_conditional (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:1367:20)
[ERROR] Alloy Compile Error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.