By default, Ember-cli automatically concatenates JavaScript files into vendor.js and application.js (or <APP_NAME>.js). This makes tracebacks much less helpful. It appears that the default asset pipeline system, Broccoli, does not have a configuration flag for deactivating concatenation, but it also seems counterproductive to work around this by listing files manually.
Related
with the release of angular2 I actually encountered typescript, npm, ... for the first time, and I really appreciate its power, so I barely grasp the surface.
In the "development mode" I can find my way, but in the end:
Question:
I want to generate an independent folder that includes all necessary dependencies: js, css, html-files and is portable without needing npm, transpilers,... anymore. (So basically I want to copy this generated folder to a server and people can access the index.html as usually)
Problem
Setup
npm (as a module manager and build tool) npm as a build tool, npm as a build tool II
typescript (tsc as transpiler)
angular2 (with separated files for html, css), SystemJS
Needed Guideline
An (abstract) guideline for what steps to take in order to achieve the prescribed goal, namely a folder that has (all) the features and is build from the typescript files, (probably .scss-files,...) in a separate and self-contained way.
Probably I am searching for the wrong keywords but I have only found some fractions of my answers so far and I would really appreciate a list (of tutorials, or so) that I can stepwise go through. (Currently I feel lost)
I would have a look at the systemjs builder, using a build process such as gulp, gulp-inject to configure the index.html, and consitute the build like this:
build typescript files
bundle js files using systemjs in the build folder
build scss files (there must be a plugin for gulp) in the build folder
copy all html files in the build folder
inject dependencies in index.html
This is a raw answer to your question, untested, and from the top of my head, but I hope it can lead you to a solution. I have a little something in this repository.
I'm new to ember and after following a few guides, I've been playing around with ember apps. I'm using ember-cli to create an app, so I use
$ ember new 'app-name'
which creates the app as expected with the 'app' and 'dist' folder. But it also creates a lot of other files. I only discovered this while deleting the folder when the windows delete dialog box showed deleting more than 30000 files.
Is it that I'm doing something wrong that's causing unnecessary files to be created? Is there a way to avoid this?
You aren't doing anything wrong, a big portion of it is the dependencies and then the build process keeps a lot of temporary files around for reuse.
By the way, if you are developing in Windows, make sure you are running your command prompt as administrator, and that you've excluded the ember app from the virus scan, it really improves the build times.
It's not an issue with ember-cli itself, but how npm handles dependencies, since it has a hierarchical dependency system. You could try npm 3 (be warned, it's still beta - changelog), which tries to flatten out the dependencies better.
Another thing is checking if bower packages are adding any unneeded dependencies, like tests or raw source files (if they have pre built files). You could submit a PR to those projects by adding the ignore property in the bower.json file. See the spec here. Same with npm packages, which has a .npmignore file.
This is probably not what you wanted to hear, but in open source, we must all help each other. These are the bread crumbs of open source, and a great place to get started.
I've recently started my first Ember CLI project, and have loaded broccoli-sass to handle the stylesheets as instructed by various sources. Editing the app.scss with various test css (e.g. body {background-color:red}) that broccoli-sass provides does not result in any changes in the browser. Furthermore, checking project-name.css in the developer tools reveals an empty file--does this mean that app.scss is not being compiled? Am I supposed to manually compile this myself, or is something not happening?
Assuming you are using the latest ember-cli (0.2.3) just run this:
ember install ember-cli-sass
Put your stylesheet in app/styles/app.scss
And it should just work.
I variety of errors in stylesheets included in app.scss caused app.scss to fail to load. Once these errors were corrected, the file compiled.
I am setting up the asset pipeline for a new project. We already use React.js along with webpack in a gulp-based build system and would like to use React for the new project as well. Now, since the application is written in django, I would like to port the pipeline to django-pipeline.
Ok, I can replace webpack with pipeline-browserify, and there's also PyReact for jsx compiling. But I am unable to pipe my jsx files first through the JSX compiler and then to browserify. As far as I can tell, there is just a single compiler stage with django-pipeline. Or am I missing something? Please tell me I'm wrong...
Thanks!
My quick way for dealing with this was just to also use the reactify plugin for browserify and adding PIPELINE_BROWSERIFY_ARGUMENTS = '-t reactify' to my Django settings.
Django-pipeline does support putting multiple compilers, though in my particular case, since I've used browserify more than django-pipeline, I used the single browserify compiler instead.
I use leiningen to manage my clojure project and I want to copy jar file along with some other files into a certain directory as a final part of a build process. Leiningen treats 'resources' as something which should be included into the jar file, and it is unacceptable for me. If I used maven, I could configure it for such task using maven-resource-plugin or fall back to Ant using maven-antrun-plugin, but leiningen is far more convenient tool for clojure projects.
Strangely, I couldn't manage to find anything about similar functionality in leiningen on the internet. This is curious, because one of major clojure applications is web sites, and web sites usually do not include their resources (js, css, etc) into the jar (or do they? That would be weird since slight css tweak will require rather lenghty recompilation). It comes naturally that we have to prepare site environment (copy static resources along with jar bundle into some directory layout), and this task should be done by the build tool.
Is there a plugin to copy files around the filesystem (or something which could substitute it, like running Ant), or I must write one myself? Right now I'm using shell scripts, but it is very inconvenient since I had to run several commands instead of one, and also it is unportable.
did you checkout lein-resource?
in any case. here is a long list of available plugins for lein, maybe you will fine some of them helpful