Skip to content

Commit f6e1be9

Browse files
committed
Added clipboad implementation and improved js dependencies
1 parent 1e7c497 commit f6e1be9

File tree

9 files changed

+45
-12675
lines changed

9 files changed

+45
-12675
lines changed

src/LIN3S/PatternLibraryBuilder/Resources/assets/build/patternlibrary.css

Lines changed: 1 addition & 576 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/LIN3S/PatternLibraryBuilder/Resources/assets/build/patternlibrary.js

Lines changed: 3 additions & 12083 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/LIN3S/PatternLibraryBuilder/Resources/assets/build/patternlibrary.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* This file is part of the Pattern Library Builder library.
3+
*
4+
* Copyright (c) 2017-present LIN3S <info@lin3s.com>
5+
*
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*
9+
* @author Mikel Tuesta <mikeltuesta@gmail.com>
10+
*/
11+
12+
import {onDomReady} from 'lin3s-event-bus';
13+
import Clipboard from 'clipboard';
14+
15+
const initClipboard = () => {
16+
new Clipboard('.js-clipboard');
17+
};
18+
19+
onDomReady(initClipboard);

src/LIN3S/PatternLibraryBuilder/Resources/assets/js/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ import 'prismjs/components/prism-twig';
1818

1919
import './layouts/Finder/init';
2020

21-
import './components/Tabbed/init';
2221
import './components/Accordion/init';
22+
import './components/Clipboard/init';
23+
import './components/Tabbed/init';

src/LIN3S/PatternLibraryBuilder/Resources/assets/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"license": "MIT",
1212
"author": "LIN3S",
1313
"dependencies": {
14+
"clipboard": "^1.7.1",
1415
"foundation-sites": "^6.3.1",
1516
"lin3s-event-bus": "^0.5.1",
1617
"lin3s-front-foundation": "^0.2.2",
@@ -30,8 +31,8 @@
3031
},
3132
"scripts": {
3233
"phoenix": "rm -rf node_modules && yarn install",
33-
"build": "node_modules/webpack/bin/webpack.js",
34-
"build:prod": "node_modules/webpack/bin/webpack.js --env.env prod -p",
34+
"build": "node_modules/webpack/bin/webpack.js --env.env prod -p && rm -rf build/modernizr.js",
35+
"build:dev": "node_modules/webpack/bin/webpack.js",
3536
"build:watch": "node_modules/webpack/bin/webpack.js --watch"
3637
}
3738
}

src/LIN3S/PatternLibraryBuilder/Resources/assets/webpack.config.babel.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {Webpack} from 'lin3s-distribution';
1515

1616
const options = {
1717
entry: {
18-
'patternlibrary': './js/index.js',
18+
'patternlibrary': './js/index.js'
1919
},
2020
input: {
2121
base: '',
@@ -25,19 +25,18 @@ const options = {
2525
jsPath: './build',
2626
jsPublicPath: '/',
2727
jsFilename: '[name].js',
28-
jsFilenameProduction: '[name].[chunkhash].js',
28+
jsFilenameProduction: '[name].js',
2929

3030
cssPath: '',
3131
cssPublicPath: '/',
3232
cssFilename: '[name].css',
33-
cssFilenameProduction: '[name].[contenthash].css'
33+
cssFilenameProduction: '[name].css'
3434
},
3535
postcss: {
3636
autoprefixer: {
3737
browsers: ['last 2 versions']
3838
}
39-
},
40-
manifest: '../../manifest.json'
39+
}
4140
};
4241

4342
export default Webpack(options);

src/LIN3S/PatternLibraryBuilder/Resources/assets/yarn.lock

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,14 @@ clipboard@^1.5.5:
11511151
select "^1.1.2"
11521152
tiny-emitter "^1.0.0"
11531153

1154+
clipboard@^1.7.1:
1155+
version "1.7.1"
1156+
resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-1.7.1.tgz#360d6d6946e99a7a1fef395e42ba92b5e9b5a16b"
1157+
dependencies:
1158+
good-listener "^1.2.2"
1159+
select "^1.1.2"
1160+
tiny-emitter "^2.0.0"
1161+
11541162
cliui@^2.1.0:
11551163
version "2.1.0"
11561164
resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
@@ -2233,7 +2241,7 @@ globule@^1.0.0:
22332241
lodash "~4.16.4"
22342242
minimatch "~3.0.2"
22352243

2236-
good-listener@^1.2.0:
2244+
good-listener@^1.2.0, good-listener@^1.2.2:
22372245
version "1.2.2"
22382246
resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50"
22392247
dependencies:
@@ -4944,6 +4952,10 @@ tiny-emitter@^1.0.0:
49444952
version "1.2.0"
49454953
resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-1.2.0.tgz#6dc845052cb08ebefc1874723b58f24a648c3b6f"
49464954

4955+
tiny-emitter@^2.0.0:
4956+
version "2.0.0"
4957+
resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.0.0.tgz#bad327adb1804b42a231afa741532bd884cd09ad"
4958+
49474959
to-arraybuffer@^1.0.0:
49484960
version "1.0.1"
49494961
resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43"

src/LIN3S/PatternLibraryBuilder/Resources/manifest.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)