Brunch

Loops make Less to run out of memory. (Structure optimization)

独自空忆成欢 提交于 2019-12-02 06:40:17
I'm working on a less project, but as is start to become a bit big, every time that i'm trying to compile i run out of memory. This is my current structure: style.less colors.less icons.less styles style1 style2 style3 Now, colors.less is a list of colors and their classes icons.less a list of icons and their classes style.less is the main file, where all is included and compiled styles is a folder containing all the difference for every different style my question (well, actually is more a suggestion than a question) is: how can i optimize this structure so that i don't run out of memory

Brunch: separating vendor and app javascript

爷,独闯天下 提交于 2019-12-01 16:16:58
问题 I have made two bundles of javascript from our project- vendor and app. I do this in the manner suggested by the documentation, as seen in this snippet from my brunch-config.js: files: { javascripts: { joinTo: { 'js/vendor.js': /^(?!source\/)/, 'js/app.js': /^source\// }, entryPoints: { 'source/scripts/app.jsx': 'js/app.js' } } } And I end up with a vendor.js and an app.js. But check out the file sizes: Note how app.js is larger than vendor.js! This large size makes watching slower than it

Separating app and vendor css in Brunch

梦想与她 提交于 2019-12-01 03:29:28
My Brunch template compiles all my code into app.js and all third party dependencies into vendor.js (a pretty standard approach). I'd like to do the same with CSS and it used to work but as I moved to using Bower something stopped working and I now get the following error: Error: couldn't load config /path-to-root/config.coffee. SyntaxError: unexpected { at Object.exports.loadConfig (/usr/local/share/npm/lib/node_modules/brunch/lib/helpers.js:448:15) from a configuration file (config.cofee) that looks like this: files: javascripts: joinTo: 'javascripts/app.js': /^app/ 'javascripts/vendor.js':

How To Add CSS/JS Dependencies To Phoenix Project?

 ̄綄美尐妖づ 提交于 2019-12-01 02:56:42
I'm trying to add jquery to a Phoenix project. When I link to jquery direct in app.html.eex in the head tag like so: <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> ...It works. However, I don't want a web dependency. I want jquery within the app. I've copied jquery.min.js to the web/static/js directory. And referenced it in app.html.eex like so: <script src="<%= static_path(@conn, "/js/jquery.min.js") %>"></script> It doesn't work. Copying jquery.min.js to app.js doesn't work either. Interesting enough when I place the JS between

Separating app and vendor css in Brunch

断了今生、忘了曾经 提交于 2019-11-30 23:53:41
问题 My Brunch template compiles all my code into app.js and all third party dependencies into vendor.js (a pretty standard approach). I'd like to do the same with CSS and it used to work but as I moved to using Bower something stopped working and I now get the following error: Error: couldn't load config /path-to-root/config.coffee. SyntaxError: unexpected { at Object.exports.loadConfig (/usr/local/share/npm/lib/node_modules/brunch/lib/helpers.js:448:15) from a configuration file (config.cofee)

How To Add CSS/JS Dependencies To Phoenix Project?

这一生的挚爱 提交于 2019-11-30 22:53:44
问题 I'm trying to add jquery to a Phoenix project. When I link to jquery direct in app.html.eex in the head tag like so: <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> ...It works. However, I don't want a web dependency. I want jquery within the app. I've copied jquery.min.js to the web/static/js directory. And referenced it in app.html.eex like so: <script src="<%= static_path(@conn, "/js/jquery.min.js") %>"></script> It doesn't

svn和git的使用

﹥>﹥吖頭↗ 提交于 2019-11-30 18:07:34
1.创建分支和合并 1.1 conerstone中svn的使用: 创建分支:svn的创建分支需要点击repository里面对应的文件,然后点击brunch按钮,就可以创建一个新的分支,创建过程中,需要选择分支所在的目录,目录也是基于repository的 checkout 分支,之后基于此分支的修改,也会同步到的对应的分支上。 合并分支:比如将分支test合并到master上,就需要在repository里面选中master,点击merge按钮,from里面选择test,然后点击确认就可以合并了,合并是合并到master分支上了。 合并之后master上可能会有冲突,因此还需要将冲突解决之后,再提交一次 1.2 sourcetree中git的使用 来源: https://my.oschina.net/u/3697347/blog/3112866