From c035644fa6eb34969f521efe94dfa96023fc6e9b Mon Sep 17 00:00:00 2001 From: OctoD Date: Tue, 23 May 2017 18:49:21 +0200 Subject: [PATCH] chore: Removed track from .git --- .gulp/index.js | 9 ------ .gulp/paths.js | 11 ------- .gulp/tasks/bump.js | 37 ----------------------- .gulp/tasks/changelog.js | 18 ----------- .gulp/tasks/icons.js | 55 ---------------------------------- .gulp/tasks/themes.js | 65 ---------------------------------------- .gulp/tasks/watcher.js | 12 -------- gulpfile.babel.js | 9 ------ test/source.js | 58 ----------------------------------- 9 files changed, 274 deletions(-) delete mode 100644 .gulp/index.js delete mode 100644 .gulp/paths.js delete mode 100644 .gulp/tasks/bump.js delete mode 100644 .gulp/tasks/changelog.js delete mode 100644 .gulp/tasks/icons.js delete mode 100644 .gulp/tasks/themes.js delete mode 100644 .gulp/tasks/watcher.js delete mode 100644 gulpfile.babel.js delete mode 100644 test/source.js diff --git a/.gulp/index.js b/.gulp/index.js deleted file mode 100644 index 117146c..0000000 --- a/.gulp/index.js +++ /dev/null @@ -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']; diff --git a/.gulp/paths.js b/.gulp/paths.js deleted file mode 100644 index 986493f..0000000 --- a/.gulp/paths.js +++ /dev/null @@ -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; diff --git a/.gulp/tasks/bump.js b/.gulp/tasks/bump.js deleted file mode 100644 index 91c404a..0000000 --- a/.gulp/tasks/bump.js +++ /dev/null @@ -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('./')); -}); \ No newline at end of file diff --git a/.gulp/tasks/changelog.js b/.gulp/tasks/changelog.js deleted file mode 100644 index bc8c075..0000000 --- a/.gulp/tasks/changelog.js +++ /dev/null @@ -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('./')); -}); \ No newline at end of file diff --git a/.gulp/tasks/icons.js b/.gulp/tasks/icons.js deleted file mode 100644 index 9c1bef8..0000000 --- a/.gulp/tasks/icons.js +++ /dev/null @@ -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(); -}); diff --git a/.gulp/tasks/themes.js b/.gulp/tasks/themes.js deleted file mode 100644 index 553c33d..0000000 --- a/.gulp/tasks/themes.js +++ /dev/null @@ -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') - ); -}); diff --git a/.gulp/tasks/watcher.js b/.gulp/tasks/watcher.js deleted file mode 100644 index d08fbad..0000000 --- a/.gulp/tasks/watcher.js +++ /dev/null @@ -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']); -}); \ No newline at end of file diff --git a/gulpfile.babel.js b/gulpfile.babel.js deleted file mode 100644 index 2869b44..0000000 --- a/gulpfile.babel.js +++ /dev/null @@ -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); \ No newline at end of file diff --git a/test/source.js b/test/source.js deleted file mode 100644 index 4a8d015..0000000 --- a/test/source.js +++ /dev/null @@ -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" \ No newline at end of file