Comments (5)
I just feel that workflow should be like this:
- Use Ti Generator to gen a project.
- Run Rakefile which is part of the generated project, to compile, build and deploy the project.
- Iteratively, use Ti generator to gen views etc.
- Run Rakefile to compile, build and deploy.
Here is what Wynn had changed with the paths for compiling Coffeescripts:
def compile_coffee puts "Compiling CoffeeScript".blue paths =
find src/#{@ticonfig.name} -name '*.coffee'`.split("\n")
compilation = (
system "coffee -p --join --bare #{paths.join(' ')} > Resources/#{@ticonfig.name.downcase!}.js" and
system "coffee -p --bare src/app.coffee > Resources/app.js"
)
if compilation
puts "Successfully compiled CoffeeScript".green
else
puts "Error compiling CoffeeScript".red
end
compilation
end
`
Take a look and let me know what you think. I personally feel getting the compile options (coffeescript/sass) inside Ti, limits the flexibility of how the user wants to compile the sass/coffeescript files. We are providing source code in sass/coffeescript and hence we should allow the user to make a choice of how to compile it. If tomm. things change with these tools, we don't want to chase them and have Ti coupled with them. Just my 2 cents.
from ti.
I disagree.
The above does not solve the problem of compiling coffee-scripts in specific order and puts the problem on the developer to figure out a clean solution for doing so.
Ti should provide this solution out of the box, which is does now, with the Ti::Compiler::CoffeeScripts. The process is the same process for importing sass files, which most developers are now used to. Sprockets follows this as well.
from ti.
Check the implementation: https://github.com/codewranglers/Ti/commit/ba88674320f2ff4bb517b8f1db3d8b3ffc1c5d7a
from ti.
I've noticed that there's a big difference between the compiled js from the original Rakefile
and Ti::Compiler::CoffeeScripts
Ti::Compiler::CoffeeScripts
is using execjs
to output the js
file, thus with coffeescript is different. The coffee-script
ruby compiler that we are using in ti
lacks other option which is very critical for compiling the js
here are the compilation options that are missing from the coffee-script gem
-j, --join concatenate the scripts before compiling
I'm thinking of building another compiler or just patching the gem that we are using to have that option in.
Thoughts?
from ti.
I've pushed an update to address this. Did a diff using both versions (ti compile && rake compile) and there is no difference now.
from ti.
Related Issues (20)
- SASS Compiler HOT 2
- Generator/CLI Cleanup HOT 1
- Ti Build HOT 1
- Vendor for Plugins HOT 1
- Config Parser HOT 1
- duplicate filter for app.coffee declarations
- Whitespace Issue HOT 1
- New project generator needs android argument to point to SDK path
- missing dependency on 1.9.2@osx-snowleopard HOT 3
- Project Folder not being Created HOT 1
- Project generation only works if you are using Titanium 1.6.2 HOT 2
- Cannot Create Project (Master) HOT 5
- cannot find HelloTi/Resources/iphone build iphone HOT 5
- JSS ios build HOT 1
- Extra brackets after view generation
- Testing Framework HOT 3
- zsh support ?
- Cannot run rake or ti compile/build HOT 2
- push out 0.2.1 HOT 2
- moar documentation nitpicks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ti.