Skip to content

Instantly share code, notes, and snippets.

@csprocket777
Created April 22, 2014 17:03
Show Gist options
  • Save csprocket777/11186838 to your computer and use it in GitHub Desktop.
Save csprocket777/11186838 to your computer and use it in GitHub Desktop.
Broccoli Compile Error
@import "vendor/bootstrap-sass/vendor/assets/stylesheets/bootstrap.scss";
@import "includes/colors";
@import "includes/general";
@import "includes/components/login";
@import "includes/components/controls";
@import "includes/pages/login";
@import "includes/pages/userProfile";
@import "includes/pages/options";
@import "includes/pages/users";
@import "includes/pages/fieldset_layout";
var filterTemplates = require('broccoli-template');
var uglifyJavaScript = require('broccoli-uglify-js');
var compileES6 = require('broccoli-es6-concatenator');
// var compileLess = require('broccoli-less');
var compileSass = require('broccoli-sass');
var pickFiles = require('broccoli-static-compiler');
var mergeTrees = require('broccoli-merge-trees');
var findBowerTrees = require('broccoli-bower');
var env = require('broccoli-env').getEnv();
function preprocess (tree) {
tree = filterTemplates(tree, {
extensions: ['hbs', 'handlebars'],
compileFunction: 'Ember.Handlebars.compile'
});
return tree;
}
var app = 'app';
app = pickFiles(app, {
srcDir: '/',
destDir: 'appkit' // move under appkit namespace
});
app = preprocess(app);
var styles = 'app/styles';
styles = pickFiles(styles, {
srcDir: '/',
destDir: 'appkit'
});
styles = preprocess(styles);
// var tests = broccoli.makeTree('tests')
// tests = pickFiles(tests, {
// srcDir: '/',
// destDir: 'appkit/tests'
// })
// tests = preprocess(tests)
var vendor = 'vendor';
var sourceTrees = [app, styles, vendor];
// if (env !== 'production') {
// sourceTrees.push(tests)
// }
sourceTrees = sourceTrees.concat(findBowerTrees());
var appAndDependencies = new mergeTrees(sourceTrees, {overwrite: true});
var appJs = compileES6(appAndDependencies, {
loaderFile: 'loader/loader.js',
ignoredModules: [
'ember/resolver'
],
inputFiles: [
'appkit/**/*.js'
],
legacyFilesToAppend: [
(env === 'production' ? 'appkit/config/production.js' : 'appkit/config/development.js'),
'jquery/dist/jquery.js',
'handlebars/handlebars.js',
'ember/ember.js',
'ember-data/ember-data.js',
'ember-resolver/dist/ember-resolver.js',
"bootstrap/dist/js/bootstrap.js",
"ember-addons.bs_for_ember/dist/js/bs-core.max.js",
"ember-addons.bs_for_ember/dist/js/bs-alert.max.js",
"ember-addons.bs_for_ember/dist/js/bs-badge.max.js",
"ember-addons.bs_for_ember/dist/js/bs-basic.max.js",
"ember-addons.bs_for_ember/dist/js/bs-button.max.js",
"ember-addons.bs_for_ember/dist/js/bs-growl-notifications.max.js",
"ember-addons.bs_for_ember/dist/js/bs-items-action-bar.max.js",
"ember-addons.bs_for_ember/dist/js/bs-label.max.js",
"ember-addons.bs_for_ember/dist/js/bs-list-group.max.js",
"ember-addons.bs_for_ember/dist/js/bs-modal.max.js",
"ember-addons.bs_for_ember/dist/js/bs-nav.max.js",
"ember-addons.bs_for_ember/dist/js/bs-notifications.max.js",
"ember-addons.bs_for_ember/dist/js/bs-progressbar.max.js",
"ember-addons.bs_for_ember/dist/js/bs-wizard.max.js",
"ember-validations/index.js",
"momentjs/moment.js",
"bootstrap-multiselect/js/bootstrap-multiselect.js",
"bootstrap-datepicker/js/bootstrap-datepicker.js",
"redactor/redactor/redactor.js",
"bootstrap-switch/dist/js/bootstrap-switch.js",
"jquery.scrollTo/jquery.scrollTo.js",
"autoNumeric/autoNumeric.js",
"select2/select2.js"
],
wrapInEval: env !== 'production',
outputFile: '/assets/app.js'
})
// var appCss = compileLess(styles, {paths: ['app.less', 'bootstrap.less', './appkit/includes/'], filename: 'app.css'});
var appCss = compileSass(sourceTrees, "appkit/styles/app.scss", "assets/app.css");
var vendorCss = pickFiles(appAndDependencies, {
srcDir: '/',
files: ['**/*.css'],
destDir: '/assets'
});
if (env === 'production') {
appJs = uglifyJavaScript(appJs, {
// mangle: false,
// compress: false
})
}
var publicFiles = 'public';
module.exports = mergeTrees([appJs, appCss, vendorCss, publicFiles]);
Error: EEXIST, file already exists 'tmp/main_file_picker-tmp_dest_dir-ffFiU3QA.tmp/_alerts.scss'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.writeFileSync (fs.js:966:15)
at Object.copyPreserveSync (/LDSG_SVN/Infrastructure/LRT_Ember/node_modules/broccoli-bower/node_modules/broccoli-kitchen-sink-helpers/index.js:140:8)
at MainFilePicker.write (/LDSG_SVN/Infrastructure/LRT_Ember/node_modules/broccoli-bower/index.js:30:15)
at MainFilePicker.Writer.read (/LDSG_SVN/Infrastructure/LRT_Ember/node_modules/broccoli-bower/node_modules/broccoli-writer/index.js:11:31)
at readTree (/LDSG_SVN/Infrastructure/LRT_Ember/node_modules/broccoli/lib/builder.js:61:20)
at promise.then.then.results.(anonymous function) (/LDSG_SVN/Infrastructure/LRT_Ember/node_modules/broccoli-merge-trees/node_modules/promise-map-series/index.js:8:27)
at invokeCallback (/LDSG_SVN/Infrastructure/LRT_Ember/node_modules/broccoli-merge-trees/node_modules/promise-map-series/node_modules/rsvp/dist/commonjs/rsvp/promise.js:228:21)
at publish (/LDSG_SVN/Infrastructure/LRT_Ember/node_modules/broccoli-merge-trees/node_modules/promise-map-series/node_modules/rsvp/dist/commonjs/rsvp/promise.js:176:9)
at publishFulfillment (/LDSG_SVN/Infrastructure/LRT_Ember/node_modules/broccoli-merge-trees/node_modules/promise-map-series/node_modules/rsvp/dist/commonjs/rsvp/promise.js:312:5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment