Skip to content

Commit e83d858

Browse files
committed
refactor: update banner comments across the board; reorganize JS import order to fix linting issues; remove imports from the two main entry files that aren't required to get pulled in by themselves
1 parent 52f5c80 commit e83d858

14 files changed

Lines changed: 33 additions & 86 deletions

packages/uikit-workshop/src/scripts/components/copy-to-clipboard.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
/**
2+
* Copy to clipboard functionality for code snippet examples
3+
*/
4+
15
import Clipboard from 'clipboard';
26

3-
// Copy to clipboard functionality
47
const clipboard = new Clipboard('.pl-js-code-copy-btn');
58
clipboard.on('success', function(e) {
69
const copyButton = document.querySelectorAll('.pl-js-code-copy-btn');

packages/uikit-workshop/src/scripts/components/layout.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
/*!
2-
* Simple Layout Rendering for Pattern Lab
3-
*
4-
* Copyright (c) 2014 Dave Olsen, http://dmolsen.com
5-
* Licensed under the MIT license
1+
/**
2+
* Primary UI rendering for Pattern Lab
63
*/
74

85
import Hogan from 'hogan.js';

packages/uikit-workshop/src/scripts/components/modal-styleguide.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
/*!
2-
* Modal for the Styleguide Layer
3-
* For both annotations and code/info
4-
*
5-
* Copyright (c) 2016 Dave Olsen, http://dmolsen.com
6-
* Licensed under the MIT license
7-
*
8-
* @requires panels-util.js
9-
* @requires url-handler.js
10-
*
1+
/**
2+
* "Modal" (aka Panel UI) for the Styleguide Layer - for both annotations and code/info
113
*/
124

135
import { panelsUtil } from './panels-util';

packages/uikit-workshop/src/scripts/components/modal-viewer.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
/*!
2-
* Modal for the Viewer Layer
3-
* For both annotations and code/info
4-
*
5-
* Copyright (c) 2016 Dave Olsen, http://dmolsen.com
6-
* Licensed under the MIT license
7-
*
8-
* @requires url-handler.js
9-
* @requires data-saver.js
10-
*
1+
/**
2+
* "Modal" (aka Panel UI) for the Viewer Layer - for both annotations and code/info
113
*/
124

5+
import $ from 'jquery';
136
import { urlHandler, DataSaver, Dispatcher } from '../utils';
147
import { panelsViewer } from './panels-viewer';
15-
import $ from 'jquery';
168

179
export const modalViewer = {
1810
// set up some defaults

packages/uikit-workshop/src/scripts/components/panels-util.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
/*!
2-
* Panels Util
3-
* For both styleguide and viewer
4-
*
5-
* Copyright (c) 2013-16 Dave Olsen, http://dmolsen.com
6-
* Licensed under the MIT license
7-
*
8-
* @requires url-handler.js
9-
*
1+
/**
2+
* Panels Util - for both styleguide and viewer
103
*/
114

12-
import { urlHandler } from '../utils';
13-
145
export const panelsUtil = {
156
/**
167
* Add click events to the template that was rendered

packages/uikit-workshop/src/scripts/components/panels-viewer.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
1-
/*!
2-
* Panel Builder. Supports building the panels to be included in the modal or styleguide
3-
*
4-
* Copyright (c) 2013-16 Dave Olsen, http://dmolsen.com
5-
* Licensed under the MIT license
6-
*
7-
* @requires panels.js
8-
* @requires url-handler.js
1+
/**
2+
* Panel Builder - supports building the panels to be included in the modal or styleguide
93
*/
104

11-
import { Panels } from './panels';
12-
import { panelsUtil } from './panels-util';
13-
import { urlHandler, Dispatcher } from '../utils';
145
import $ from 'jquery';
156
import Hogan from 'hogan.js';
167
import Prism from 'prismjs';
8+
import { Panels } from './panels';
9+
import { panelsUtil } from './panels-util';
10+
import { urlHandler, Dispatcher } from '../utils';
1711

1812
export const panelsViewer = {
1913
// set up some defaults

packages/uikit-workshop/src/scripts/components/panels.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
/*!
1+
/**
22
* Default Panels for Pattern Lab plus Panel related events
33
*
4-
* Copyright (c) 2016 Dave Olsen, http://dmolsen.com
5-
* Licensed under the MIT license
6-
*
7-
* config is coming from the default viewer and is passed through from PL's config
8-
*
9-
* @requires prism-languages.js
4+
* note: config is coming from the default viewer and is passed through from PL's config
105
*/
116

127
import { PrismLanguages } from './prism-languages';

packages/uikit-workshop/src/scripts/components/pattern-finder.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
/*!
1+
/**
22
* Pattern Finder
3-
*
4-
* Copyright (c) 2014 Dave Olsen, http://dmolsen.com
5-
* Licensed under the MIT license
6-
*
7-
* @requires url-handler.js
8-
*
93
*/
104

11-
import { urlHandler } from '../utils';
125
import $ from 'jquery';
136
import Bloodhound from 'typeahead.js/dist/bloodhound.js';
7+
import { urlHandler } from '../utils';
148

159
export const patternFinder = {
1610
data: [],

packages/uikit-workshop/src/scripts/components/plugin-loader.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
/*!
2-
* Plugin Loader
3-
*
4-
* Copyright (c) 2015 Dave Olsen, http://dmolsen.com
5-
* Licensed under the MIT license
6-
*
7-
* Takes the assets they can be loaded for plugins and adds them to the DOM
8-
*
9-
* @requires styleguide.js
10-
*
1+
/**
2+
* Plugin Loader - takes the assets they can be loaded for plugins and adds them to the DOM
113
*/
124

135
export const pluginLoader = {

packages/uikit-workshop/src/scripts/components/prism-languages.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
/*!
1+
/**
22
* Default languages for Prism to match rendering capability
3-
*
4-
* Copyright (c) 2016 Dave Olsen, http://dmolsen.com
5-
* Licensed under the MIT license
6-
*
73
*/
4+
85
export const PrismLanguages = {
96
languages: [],
107

0 commit comments

Comments
 (0)