diff --git a/.config/webpack.config.js b/.config/webpack.config.js index 5495bfb..bacd783 100755 --- a/.config/webpack.config.js +++ b/.config/webpack.config.js @@ -4,8 +4,8 @@ const webpack = require('webpack'), // default plugins var plugins = [ new webpack.ProvidePlugin({ - gi: 'gi-js-base', - base: 'gi-js-base', + gi: '@goldinteractive/js-base/src', + base: '@goldinteractive/js-base/src', $: 'jquery', jQuery: 'jquery' }), @@ -65,7 +65,6 @@ module.exports = function(env) { watch: IS_WATCH, module: { rules: [ - // { test: require.resolve('jquery'), loader: 'expose?$!expose?jQuery' }, { test: /\.js$/, exclude: /(node_modules|bower)/, @@ -76,9 +75,8 @@ module.exports = function(env) { ] } }, - // gi base es6 source { - test: /gi-js-base\/src/, + test: /@goldinteractive\/(?!.+node_modules)/, loader: 'babel-loader', query: { presets: [ diff --git a/Makefile b/Makefile index f62f8e0..d0d30ba 100755 --- a/Makefile +++ b/Makefile @@ -10,17 +10,17 @@ build: clean js css copy feature-install-%: # install feature - @ yarn add gi-feature-$* + @ yarn add @goldinteractive/feature-$* # copy feature assets - @ rsync -r $(NODE_MODULES)/gi-feature-$*/assets/features/* $(ASSETS_PATH)/features + @ rsync -r $(NODE_MODULES)/@goldinteractive/feature-$*/assets/features/* $(ASSETS_PATH)/features feature-remove-%: # remove feature - @ yarn remove gi-feature-$* + @ yarn remove @goldinteractive/feature-$* feature-upgrade-%: # upgrade feature - @ yarn upgrade gi-feature-$* + @ yarn upgrade @goldinteractive/feature-$* jsdoc: # generate js documentation diff --git a/assets/features/icons/.gitkeep b/assets/features/icons/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/assets/features/object-fit/.gitkeep b/assets/features/object-fit/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/assets/js/features/randomquote.js b/assets/js/features/randomquote.js index ceda624..649eb49 100644 --- a/assets/js/features/randomquote.js +++ b/assets/js/features/randomquote.js @@ -1,3 +1,5 @@ +import { features } from '@goldinteractive/js-base' + const quotes = [ ['Programs must be written for people to read, and only incidentally for machines to execute.', 'Harold Abelson'], ["You've baked a really lovely cake, but then you've used dog shit for frosting.", 'Steve Jobs'], @@ -15,7 +17,7 @@ const quotes = [ * * @extends {module:base/features~Feature} */ -class RandomQuote extends gi.features.Feature { +class RandomQuote extends features.Feature { init() { var quote = quotes[Math.floor(Math.random()*quotes.length)] diff --git a/assets/js/main.js b/assets/js/main.js index f040348..1ea96ac 100755 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -2,13 +2,13 @@ import * as SHARED from '../shared-variables' // helpers -import { Scroller } from 'gi-js-base/src/utils/dom' -import { DeviceInfo } from 'gi-js-base/src/utils/device' +import { Scroller } from '@goldinteractive/js-base/src/utils/dom' +import { DeviceInfo } from '@goldinteractive/js-base/src/utils/device' // icons -import { Icon, IconManager } from 'gi-feature-icons' +import { Icon, IconManager } from '@goldinteractive/feature-icons' // object-fit polyfill -import ObjectFit from 'gi-feature-object-fit' +import ObjectFit from '@goldinteractive/feature-object-fit' // site features import RandomQuote from './features/randomquote' diff --git a/assets/scss/style.scss b/assets/scss/style.scss index 3430948..83cd461 100755 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -14,8 +14,8 @@ // Third party css @import - 'gi-feature-icons/src/style', - 'gi-feature-object-fit/src/style'; + '@goldinteractive/feature-icons/src/style', + '@goldinteractive/feature-object-fit/src/style'; // Base CSS @import diff --git a/package.json b/package.json index a97fef6..ba80bf7 100644 --- a/package.json +++ b/package.json @@ -14,9 +14,9 @@ "author": "Gold Interactive", "license": "MIT", "dependencies": { - "gi-feature-icons": "^0.0.14", - "gi-feature-object-fit": "^0.0.14", - "gi-js-base": "^0.0.61", + "@goldinteractive/feature-icons": "^0.0.2", + "@goldinteractive/feature-object-fit": "^0.0.1", + "@goldinteractive/js-base": "^0.0.1", "gridle": "^2.0.48", "jquery": "^3.2.1" }, @@ -30,14 +30,14 @@ "cssnano": "^3.10.0", "eslint": "^4.7.2", "expose-loader": "^0.7.3", - "svgo": "^1.0.4", + "imports-loader": "^0.7.1", "postcss-assets": "^5.0.0", "postcss-cli": "^4.1.1", "postcss-import": "^11.0.0", "postcss-object-fit-images": "^1.1.2", "postcss-pxtorem": "^4.0.1", "sanitize.css": "^5.0.0", - "webpack": "^3.8.1", - "imports-loader": "^0.7.1" + "svgo": "^1.0.4", + "webpack": "^3.8.1" } } diff --git a/yarn.lock b/yarn.lock index c0faf9a..a90863b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,32 @@ # yarn lockfile v1 +"@goldinteractive/feature-icons@^0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@goldinteractive/feature-icons/-/feature-icons-0.0.2.tgz#d595cb8b25b1bcbbc1c69270c28f4f955005cc77" + +"@goldinteractive/feature-object-fit@^0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@goldinteractive/feature-object-fit/-/feature-object-fit-0.0.1.tgz#18f42958e41ca884b47e5338ab3c9c8007f170df" + dependencies: + iphone-inline-video "^2.2.2" + object-fit-images "^3.2.3" + object-fit-videos "^1.0.4" + +"@goldinteractive/js-base@^0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@goldinteractive/js-base/-/js-base-0.0.1.tgz#91daec794b0903bfec0289f61304ddeaa5903bf5" + dependencies: + camel-case "^3.0.0" + core-js "^2.5.1" + detect-it "^3.0.3" + easing-js danro/easing-js + fetch-jsonp "^1.1.3" + promise-polyfill "^6.0.2" + qs "^6.5.1" + riot-observable "^3.0.0" + whatwg-fetch "^2.0.3" + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -1218,10 +1244,14 @@ cookie@0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" -core-js@^2.4.0, core-js@^2.5.0, core-js@^2.5.1: +core-js@^2.4.0, core-js@^2.5.0: version "2.5.1" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b" +core-js@^2.5.1: + version "2.5.3" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -1546,8 +1576,8 @@ detect-indent@^4.0.0: repeating "^2.0.0" detect-it@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/detect-it/-/detect-it-3.0.3.tgz#8e13daa0b62126150cbf76d083a1d34d1b07d071" + version "3.0.4" + resolved "https://registry.yarnpkg.com/detect-it/-/detect-it-3.0.4.tgz#79df04f25cc5b2529ebfa37c0fa1baa0e1d41862" dependencies: detect-hover "^1.0.2" detect-passive-events "^1.0.4" @@ -2198,32 +2228,6 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -gi-feature-icons@^0.0.14: - version "0.0.14" - resolved "https://registry.yarnpkg.com/gi-feature-icons/-/gi-feature-icons-0.0.14.tgz#ea42edecef1cae8701f3a3ed031742a1bdae45ed" - -gi-feature-object-fit@^0.0.14: - version "0.0.14" - resolved "https://registry.yarnpkg.com/gi-feature-object-fit/-/gi-feature-object-fit-0.0.14.tgz#57d61fdd243b5dbdc39d5ced63d053c0a1ee4e6c" - dependencies: - iphone-inline-video "^2.2.2" - object-fit-images "^3.2.3" - object-fit-videos "^1.0.4" - -gi-js-base@^0.0.61: - version "0.0.61" - resolved "https://registry.yarnpkg.com/gi-js-base/-/gi-js-base-0.0.61.tgz#861cffc51bfb7a1587db6f35fb64f91b602f58e3" - dependencies: - camel-case "^3.0.0" - core-js "^2.5.1" - detect-it "^3.0.3" - easing-js danro/easing-js - fetch-jsonp "^1.1.3" - promise-polyfill "^6.0.2" - qs "^6.5.1" - riot-observable "^3.0.0" - whatwg-fetch "^2.0.3" - glob-base@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" @@ -3880,8 +3884,8 @@ progress@^2.0.0: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" promise-polyfill@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-6.0.2.tgz#d9c86d3dc4dc2df9016e88946defd69b49b41162" + version "6.1.0" + resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-6.1.0.tgz#dfa96943ea9c121fca4de9b5868cb39d3472e057" prr@~0.0.0: version "0.0.0"