Brunch

Javascript not displaying - Brunch.io - brunch-with-brunch

元气小坏坏 提交于 2019-12-07 02:17:17
问题 I have just started a new brunch.io project using the brunch-with-brunch skeleton (I just want a local server able to display native HTML/CSS/JS). I have created two files on my own : index.html located in public/ containing the standard doctype, head and body tags plus a script tag referencing the app.js generated by brunch located at public/javascripts/app.js as below : <script type="text/javascript" src="javascripts/app.js"></script> As specified by the README.md file located in the app/

Brunch installed with phoenix app doesn't work with bower assets

放肆的年华 提交于 2019-12-06 10:32:52
I have created Phoenix 1.0.4 (Elixir) application. After I had added some logic in application I wanted to switch my work for front-end part. On page http://www.jonathanbirkholz.com/how-to-use-font-awesome-on-phoenix/ I read that for 3rd assets I should use Bower. Unfortunately with font-awesome or bootstrap-sass from Bower and with command brunch build I always receive: /.../my_app/node_modules/acorn/dist/acorn.js:1747 throw err; ^ SyntaxError: Unexpected token (2:10) at Parser.pp.raise (/.../my_app/node_modules/acorn/dist/acorn.js:1745:13) at Parser.pp.unexpected (/.../my_app/node_modules

How to use Phoenix Channels / Sockets in an Angular 2 app?

感情迁移 提交于 2019-12-06 08:57:10
问题 I have a backend built with Elixir / Phoenix and a frontend built with Angular 2 (Typescript, Brunch,io for building, ES6). I now want to use Phoenix Channels. And I'm a bit desperate trying to use the Phoenix Javascript Client in my frontend. When I install https://www.npmjs.com/package/phoenix-js via npm install phoenix-js and then try to inject it into a service in angular like this: import { Socket } from "phoenix-js"; I always get the error Cannot find module phoenix-js during

Javascript not displaying - Brunch.io - brunch-with-brunch

二次信任 提交于 2019-12-05 09:36:19
I have just started a new brunch.io project using the brunch-with-brunch skeleton (I just want a local server able to display native HTML/CSS/JS). I have created two files on my own : index.html located in public/ containing the standard doctype, head and body tags plus a script tag referencing the app.js generated by brunch located at public/javascripts/app.js as below : <script type="text/javascript" src="javascripts/app.js"></script> As specified by the README.md file located in the app/ directory, I write my applications-specific files in the app/ directory. So I have on file named app.js

Vendor CSS files not being compiled for Brunch

隐身守侯 提交于 2019-12-05 07:07:11
I am having an issue with brunch@1.7.6 not compiling bower_component css files. Similar to Separating app and vendor css in Brunch . Only the css/app.css is getting generated for me. :/ { stylesheets: { joinTo: { 'css/app.css': /^app/, 'css/vendor.css': /^bower_components/ } } Please let me know if I am doing something wrong. All seemed fine when I was using brunch@1.6.7. Did the config change with the introduction to bower being built in? With regards to x-editable , I ran into the failure to include the bower_components css, but found that I simply had to add the specifics in the overrides

Control order of script concatenation using Brunch

倾然丶 夕夏残阳落幕 提交于 2019-12-05 02:24:30
What is the best practice for controlling the order in which scripts / stylesheets are concatenated when using Brunch? A simple version of my problem involves an application using Twitter Bootstrap, which requires jQuery. Bootstrap requires that jQuery is loaded first. Initially I had the following in my vendor/ directory: jquery-1.9.1.min.js and bootstrap.min.js Which was concatenated by Brunch into my vendor.js file in alphabetical order, namely, bootstrap first. To solve this I appended a number to the beginning of each script to designate the order in which I wanted them to concat -- 1

How to use Phoenix Channels / Sockets in an Angular 2 app?

别来无恙 提交于 2019-12-04 11:55:19
I have a backend built with Elixir / Phoenix and a frontend built with Angular 2 (Typescript, Brunch,io for building, ES6). I now want to use Phoenix Channels. And I'm a bit desperate trying to use the Phoenix Javascript Client in my frontend. When I install https://www.npmjs.com/package/phoenix-js via npm install phoenix-js and then try to inject it into a service in angular like this: import { Socket } from "phoenix-js"; I always get the error Cannot find module phoenix-js during compilation. I'm a bit stuck and every hint on how to get this to work would be greatly appreciated. Thanks Edit:

Loading vendor javascript as modules

让人想犯罪 __ 提交于 2019-12-04 05:26:20
I'm working on an application built with Brunch. I would like to load some* of the vendor-supplied javascript as modules, so that I can require them in my code, rather than relying on global variables. Is there some way to do this, without copying all the vendor code into my app directory? I tried creating a vendorlib directory, but brunch doesn't seem to look anywhere bu app and vendor . I also tried making a vendor/modules directory, but brunch seems to not wrap anything found under vendor (even when I convinced it to combine those files with the files other modules found under app .) *The

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

心已入冬 提交于 2019-12-04 05:21: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

Brunch how to disable RequireJS module wrapping

。_饼干妹妹 提交于 2019-12-03 11:26:24
Update: For anyone interested in using Brunch with AngularJS I've put together a seed project angular-brunch-seed I'm using Brunch with AngularJS . AngularJS provides a module system so the need for importing file using commonJS / AMD is redundant. Is it possible to disable this feature for files in the /app directory? Essentially I would like it to compile files unaltered like it does for the /vendor directory. So the preferred out come would be: joinTo: 'js/app.js': /^app/ 'js/vendor.js': /^vendor/ With both js/app.js and js/vender.js containing compile files from each respective folder, but