evs-chris / gobble-concat-css Goto Github PK
View Code? Open in Web Editor NEWConcatenate CSS with gobble using rework
License: MIT License
Concatenate CSS with gobble using rework
License: MIT License
Hi,
I get this error when trying to use @import withing my main css-file.
The setup is as follows:
My main CSS file adv-styles.css contains:
@import '../bootstrap/css/bootstrap.min.css';
@import '../bootstrap/css/bootstrap-theme.min.css';
body {
background-color: yellow;
}
I use Bootstrap v3.3.4
In my gobblefile.js I have the following settings for concat-css:
gobble('./src/styles/')
.transform('concat-css',
{
debug: false,
dest: './assets/bundle.css',
sourcemap: true
}),
My src/styles folder contains:
advarics/images
advarics/adv-styles.css
bootstrap/css
bootstrap/fonts
bootstrap/js
Within the bootstrap-css folder there are original .map files but concat-css seems to ignore them during the copy-process of CSS files to .gobble/01-concatCss subfolder.
And this is the error I get.
gobble: 01-concatCss transformation failed
>>>
ENOENT, no such file or directory 'd:\src\js\ractive\RactAmp\.gobble\01-concatCss\1\bootstrap\css\bootstrap-theme.css.map'
Error: ENOENT, no such file or directory 'd:\src\js\ractive\RactAmp\.gobble\01-concatCss\1\bootstrap\css\bootstrap-theme.css.map'
at Error (native)
at Object.fs.openSync (fs.js:502:18)
at fs.readFileSync (fs.js:354:15)
at resolveSourceMapSync (d:\src\js\ractive\RactAmp\node_modules\gobble-concat-css\node_modules\rework\node_modules\css\node_modules\source-map-resolve\lib\source-map-resolve-node.js:49:39)
at Object.resolveSync (d:\src\js\ractive\RactAmp\node_modules\gobble-concat-css\node_modules\rework\node_modules\css\node_modules\source-map-resolve\lib\source-map-resolve-node.js:196:17)
at Compiler.<anonymous> (d:\src\js\ractive\RactAmp\node_modules\gobble-concat-css\node_modules\rework\node_modules\css\lib\stringify\source-map-support.js:105:42)
at Array.forEach (native)
at Compiler.exports.applySourceMaps (d:\src\js\ractive\RactAmp\node_modules\gobble-concat-css\node_modules\rework\node_modules\css\lib\stringify\source-map-support.js:100:27)
at module.exports (d:\src\js\ractive\RactAmp\node_modules\gobble-concat-css\node_modules\rework\node_modules\css\lib\stringify\index.js:36:14)
at Rework.toString (d:\src\js\ractive\RactAmp\node_modules\gobble-concat-css\node_modules\rework\index.js:64:16)
<<<
But, as I said there are bootstrap\css\bootstrap-theme.css.map and bootstrap\css\bootstrap.css.map files in the subfolder.
Hi,
When the option "sourcemap" is set to true the following error appears:
ENOENT, open 'd:\src\js\ractive\RactAmp\.gobble\05-merge\1\assets\assets\bundle.css.map *'
>>>
Error: ENOENT, open 'd:\src\js\ractive\RactAmp\.gobble\05-merge\1\assets\assets\bundle.css.map *'
at Error (native)
Interestingly, the CSS base path is wrong because in my gobblefile.js I have './assets/bundle.css' and not './assets/assets/bundle.css'.
Anyway, here's my gobblefile.js too:
var gobble = require('gobble');
module.exports = gobble([
//document root
gobble('./src/root'),
//transform styles
gobble('./src/styles').transform('concat-css',
{
debug: true,
dest: './assets/bundle.css',
sourcemap: true,
}),
//transform scripts
gobble('./src/scripts')
.transform('ractive',
{
type: 'es6'
})
.transform('babel',
{
optional: ['runtime'],
sourceMap: true,
compact: true,
nonStandard: true
})
.transform('browserify', {
entries: './advarics/app.js',
dest: './bundle.js',
sourcemap: true
}),
]
);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.