chore: Removed track from .git
This commit is contained in:
parent
d32be8bc39
commit
c035644fa6
9 changed files with 0 additions and 274 deletions
|
@ -1,9 +0,0 @@
|
|||
// import the tasks
|
||||
import './tasks/changelog';
|
||||
import './tasks/bump';
|
||||
import './tasks/icons';
|
||||
import './tasks/themes';
|
||||
import './tasks/watcher';
|
||||
|
||||
// export default script
|
||||
export default ['build:themes'];
|
|
@ -1,11 +0,0 @@
|
|||
import infos from '../package.json';
|
||||
|
||||
const today = new Date()
|
||||
, paths = {
|
||||
'icons': './icons',
|
||||
'themes': './themes',
|
||||
'src': './src',
|
||||
'dist': './dist'
|
||||
};
|
||||
|
||||
export default paths;
|
|
@ -1,37 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
/*
|
||||
* > Bump
|
||||
*/
|
||||
|
||||
import Gulp from 'gulp';
|
||||
import runSequence from 'run-sequence';
|
||||
import gutil from 'gulp-util';
|
||||
import yrgv from 'yargs';
|
||||
import bump from 'gulp-bump';
|
||||
import Gulpif from 'gulp-if';
|
||||
|
||||
var argv = yrgv.argv;
|
||||
|
||||
Gulp.task('bump', (cb) => {
|
||||
runSequence(
|
||||
'bump-pkg-version',
|
||||
(error) => {
|
||||
if (error) {
|
||||
console.log(gutil.colors.magenta.bold('[bump]'), gutil.colors.red.bold(' There was an issue bumping version:\n'), error.message);
|
||||
} else {
|
||||
console.log(gutil.colors.magenta.bold('\n[bump]'), gutil.colors.green.bold(' Finished successfully\n'));
|
||||
}
|
||||
cb(error);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
Gulp.task('bump-pkg-version', () => {
|
||||
return Gulp.src(['./package.json'])
|
||||
.pipe(Gulpif((Object.keys(argv).length === 2), bump()))
|
||||
.pipe(Gulpif(argv.patch, bump()))
|
||||
.pipe(Gulpif(argv.minor, bump({ type: 'minor' })))
|
||||
.pipe(Gulpif(argv.major, bump({ type: 'major' })))
|
||||
.pipe(Gulp.dest('./'));
|
||||
});
|
|
@ -1,18 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
/*
|
||||
* > Changelog
|
||||
*/
|
||||
|
||||
import Gulp from 'gulp';
|
||||
import conventionalChangelog from 'gulp-conventional-changelog';
|
||||
|
||||
|
||||
Gulp.task('changelog', () => {
|
||||
return Gulp.src('CHANGELOG.md')
|
||||
.pipe(conventionalChangelog({
|
||||
preset: 'angular',
|
||||
releaseCount: 0
|
||||
}))
|
||||
.pipe(Gulp.dest('./'));
|
||||
});
|
|
@ -1,55 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
/*
|
||||
* > Build Icons
|
||||
*/
|
||||
|
||||
import fs from 'fs';
|
||||
import Gulp from 'gulp';
|
||||
import Mustache from 'mustache';
|
||||
import gutil from 'gulp-util';
|
||||
import Paths from '../paths';
|
||||
|
||||
Gulp.task('build:icons', cb => {
|
||||
const partials = fs.readdirSync(`${Paths.src}/icons/partials`);
|
||||
const partialData = {};
|
||||
const files = fs.readdirSync(`${Paths.src}/icons/svgs`);
|
||||
const icons = files.map(file => ({ name: file.split('.')[0], last: false }));
|
||||
icons[icons.length - 1].last = true;
|
||||
|
||||
partials.forEach(partial => {
|
||||
partialData[partial.split('.')[0]] = fs.readFileSync(
|
||||
`${Paths.src}/icons/partials/${partial}`,
|
||||
'utf-8'
|
||||
);
|
||||
});
|
||||
|
||||
let contents = Mustache.render(
|
||||
fs.readFileSync(`${Paths.src}/icons/icons-theme.json`, 'utf-8'),
|
||||
{ icons },
|
||||
partialData
|
||||
);
|
||||
|
||||
try {
|
||||
contents = JSON.stringify(JSON.parse(contents), null, 2);
|
||||
} catch (err) {
|
||||
gutil.log(
|
||||
gutil.colors.red('There is an error with JSON generated for icons'),
|
||||
err
|
||||
);
|
||||
cb(err);
|
||||
return;
|
||||
}
|
||||
|
||||
const path = './themes/.material-theme-icons.tmp';
|
||||
fs.writeFileSync(path, contents, 'utf-8');
|
||||
gutil.log(
|
||||
gutil.colors.gray('\n———————————————————————————————————————————————————————————————\n')
|
||||
);
|
||||
gutil.log('Generated', gutil.colors.green(path));
|
||||
gutil.log(
|
||||
gutil.colors.gray('\n———————————————————————————————————————————————————————————————\n')
|
||||
);
|
||||
|
||||
cb();
|
||||
});
|
|
@ -1,65 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
/*
|
||||
* > Build Themes
|
||||
*/
|
||||
|
||||
import fs from 'fs';
|
||||
import Gulp from 'gulp';
|
||||
import gutil from 'gulp-util';
|
||||
import Mustache from 'mustache';
|
||||
import YAML from 'yamljs';
|
||||
|
||||
import Paths from '../paths';
|
||||
|
||||
const themeCommons = require('../../src/themes/settings/commons.json');
|
||||
const themeVariants = [];
|
||||
const themeTemplateFile = fs.readFileSync(
|
||||
`${Paths.src}/themes/theme-template-color-theme.json`,
|
||||
'utf-8'
|
||||
);
|
||||
|
||||
const files = fs.readdirSync(`${Paths.src}/themes/settings/specific`);
|
||||
|
||||
// build theme variants for later use in templating
|
||||
files.forEach(file => {
|
||||
const name = file.split('.')[0];
|
||||
const filepath = `${Paths.src}/themes/settings/specific/${file}`;
|
||||
const contents = fs.readFileSync(filepath, 'utf-8');
|
||||
|
||||
try {
|
||||
themeVariants.push(JSON.parse(contents));
|
||||
} catch (err) {
|
||||
gutil.log('Error when parsing json for theme variants', err);
|
||||
}
|
||||
});
|
||||
|
||||
Gulp.task('build:themes', cb => {
|
||||
gutil.log(
|
||||
gutil.colors.gray('\n———————————————————————————————————————————————————————————————\n')
|
||||
);
|
||||
themeVariants.forEach(variant => {
|
||||
const templateData = {
|
||||
'commons': themeCommons,
|
||||
variant
|
||||
};
|
||||
|
||||
const templateJson = JSON.parse(
|
||||
Mustache.render(themeTemplateFile, templateData)
|
||||
);
|
||||
|
||||
const path = `${Paths.themes}/${variant.name}.json`;
|
||||
|
||||
fs.writeFileSync(
|
||||
path,
|
||||
JSON.stringify(templateJson, null, 2),
|
||||
'utf-8'
|
||||
);
|
||||
|
||||
gutil.log('Generate', gutil.colors.green(path));
|
||||
});
|
||||
|
||||
gutil.log(
|
||||
gutil.colors.gray('\n———————————————————————————————————————————————————————————————\n')
|
||||
);
|
||||
});
|
|
@ -1,12 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
/*
|
||||
* > Watcher
|
||||
*/
|
||||
|
||||
import Gulp from 'gulp';
|
||||
import Paths from '../paths';
|
||||
|
||||
Gulp.task('watch', () => {
|
||||
Gulp.watch(`${Paths.src}/themes/**/*.json`, ['build:themes']);
|
||||
});
|
|
@ -1,9 +0,0 @@
|
|||
import Gulp from 'gulp';
|
||||
import GulpStats from 'gulp-stats';
|
||||
import tasks from './.gulp';
|
||||
|
||||
// Use gulp-stats
|
||||
GulpStats(Gulp);
|
||||
|
||||
// set default task
|
||||
Gulp.task('default', tasks);
|
|
@ -1,58 +0,0 @@
|
|||
var parseXML = function (data) {
|
||||
var xml, tmp;
|
||||
if (!data || typeof data !== "string") {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
if (window.DOMParser) { // Standard
|
||||
tmp = new DOMParser();
|
||||
xml = tmp.parseFromString(data, "text/xml");
|
||||
} else { // IE
|
||||
xml = new ActiveXObject("Microsoft.XMLDOM");
|
||||
xml.async = false;
|
||||
xml.loadXML(data);
|
||||
}
|
||||
} catch (e) {
|
||||
xml = undefined;
|
||||
}
|
||||
if (!xml || !xml.documentElement || xml.getElementsByTagName("parsererror").length) {
|
||||
jQuery.error("Invalid XML: " + data);
|
||||
}
|
||||
return xml;
|
||||
};
|
||||
|
||||
// Bind a function to a context, optionally partially applying any arguments.
|
||||
var proxy = function (fn, context) {
|
||||
var tmp, args, proxy;
|
||||
|
||||
if (typeof context === "string") {
|
||||
tmp = fn[context];
|
||||
context = fn;
|
||||
fn = tmp;
|
||||
}
|
||||
|
||||
// Quick check to determine if target is callable, in the spec
|
||||
// this throws a TypeError, but we will just return undefined.
|
||||
if (!jQuery.isFunction(fn)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// Simulated bind
|
||||
args = core_slice.call(arguments, 2);
|
||||
proxy = function () {
|
||||
return fn.apply(context || this, args.concat(core_slice.call(arguments)));
|
||||
};
|
||||
|
||||
// Set the guid of unique handler to the same of original handler, so it can be removed
|
||||
proxy.guid = fn.guid = fn.guid || jQuery.guid++;
|
||||
|
||||
return proxy;
|
||||
};
|
||||
|
||||
Sound.play = function () { }
|
||||
Sound.prototype = { something; }
|
||||
Sound.prototype.play = function () { }
|
||||
Sound.prototype.play = myfunc
|
||||
var parser = document.createElement('a');
|
||||
parser.href = "http://example.com:3000/pathname/?search=test#hash";
|
||||
parser.hostname; // => "example.com"
|
Loading…
Reference in a new issue