Commit d0b53ac7 authored by Philipp Nowinski's avatar Philipp Nowinski
Browse files

[FEATURE] reorganization

parent f5742cb5
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
charset = utf-8
# Get rid of whitespace to avoid diffs with a bunch of EOL changes
trim_trailing_whitespace = true
# Unix-style newlines with a newline ending every file
[*]
indent_style = tab
indent_size = 4
end_of_line = lf
insert_final_newline = true
# CSS-Files
[*.css]
indent_style = tab
indent_size = 4
# HTML-Files
[*.html]
indent_style = tab
indent_size = 4
# TMPL-Files
[*.tmpl]
indent_style = tab
indent_size = 4
# LESS-Files
[*.less]
indent_style = tab
indent_size = 4
# JS-Files
[*.js]
indent_style = tab
indent_size = 4
# JSON-Files
[*.json]
indent_style = tab
indent_size = 4
# PHP-Files
[*.php]
indent_style = tab
indent_size = 4
# ReST-Files
[*.rst]
indent_style = space
indent_size = 3
# MD-Files
[*.md]
indent_style = space
indent_size = 4
# package.json or .travis.yml
[{package.json,.travis.yml}]
indent_style = space
indent_size = 2
# TypoScript
[*.ts]
indent_style = tab
indent_size = 4
# XLF-Files
[*.xlf]
indent_style = tab
indent_size = 4
# SQL-Files
[*.sql]
indent_style = tab
indent_size = 2
const SassTask = require('./tasks/sass');
const arguments = require('yargs').argv;
if (arguments._.indexOf('css') >= 0) {
new SassTask('../web/typo3conf/ext/project_theme/Resources/Public/Sass/main.scss', './res.css').run();
}
module.exports = class task {
constructor(_input, _output, _configuration = {}) {
this._input = _input;
this._output = _output;
this._configuration = _configuration;
}
run() {
this.logError('Task is not implemented');
}
logError(_error) {
console.log(_error);
}
}
const Task = require('../task');
const sass = require('node-sass');
const fs = require('fs');
module.exports = class Sass extends Task {
run() {
sass.render({
file: this._input,
outputStyle: 'compressed'
}, (_error, _result) => {
if (!_error) {
fs.writeFile(this._output, _result.css, _error => {
if (_error) {
return this.logError(_error);
}
console.log('done');
});
} else {
this.logError(_error);
}
});
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment