Skip to content

Commit 126f58c

Browse files
committed
Remove unused packages. Use es6 let
1 parent ab2f648 commit 126f58c

File tree

11 files changed

+4015
-8608
lines changed

11 files changed

+4015
-8608
lines changed

playground/build.js

Lines changed: 3967 additions & 8481 deletions
Large diffs are not rendered by default.

playground/config.js

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,6 @@ System.config({
113113
"npm:keymirror@0.1.1/index",
114114
"npm:immutable@3.7.2/dist/immutable",
115115
"npm:events@1.0.2/events",
116-
"npm:asap@1.0.0/asap",
117-
"npm:localforage@1.2.2/src/drivers/indexeddb",
118-
"npm:localforage@1.2.2/src/utils/serializer",
119-
"npm:localforage@1.2.2/src/drivers/websql",
120-
"npm:bluebird@2.9.25/js/browser/bluebird",
121-
"src/js/lib/deferred-promise",
122116
"npm:postcss@4.1.9/lib/warn-once",
123117
"npm:base64-js@0.0.8/lib/b64",
124118
"npm:ieee754@1.1.5/index",
@@ -141,7 +135,12 @@ System.config({
141135
"npm:postcss@4.1.9/lib/vendor",
142136
"npm:extend@2.0.1/index",
143137
"src/js/actions/PlaygroundActions",
138+
"npm:babel-runtime@5.2.6/helpers/define-property",
144139
"npm:core-js@0.9.6/library/fn/object/keys",
140+
"npm:asap@1.0.0/asap",
141+
"npm:localforage@1.2.2/src/drivers/indexeddb",
142+
"npm:localforage@1.2.2/src/utils/serializer",
143+
"npm:localforage@1.2.2/src/drivers/websql",
145144
"github:wjbryant/taboverride@4.0.2/build/output/taboverride.min",
146145
"npm:process@0.10.1",
147146
"npm:react@0.13.2/lib/warning",
@@ -184,9 +183,6 @@ System.config({
184183
"npm:keymirror@0.1.1",
185184
"npm:immutable@3.7.2",
186185
"npm:events@1.0.2",
187-
"npm:asap@1.0.0",
188-
"npm:localforage@1.2.2/src/drivers/localstorage",
189-
"npm:bluebird@2.9.25",
190186
"npm:postcss@4.1.9/lib/css-syntax-error",
191187
"npm:base64-js@0.0.8",
192188
"npm:ieee754@1.1.5",
@@ -200,6 +196,8 @@ System.config({
200196
"npm:es6-promise@2.1.1",
201197
"npm:extend@2.0.1",
202198
"npm:babel-runtime@5.2.6/core-js/object/keys",
199+
"npm:asap@1.0.0",
200+
"npm:localforage@1.2.2/src/drivers/localstorage",
203201
"github:wjbryant/taboverride@4.0.2",
204202
"github:jspm/nodelibs-process@0.1.1/index",
205203
"npm:react@0.13.2/lib/ReactContext",
@@ -225,14 +223,14 @@ System.config({
225223
"npm:lodash.debounce@3.0.3/index",
226224
"npm:flux@2.0.3/index",
227225
"src/js/constants/PlaygroundConstants",
228-
"npm:promise@5.0.0/core",
226+
"src/js/stores/PlaygroundSettingsStore",
229227
"npm:postcss@4.1.9/lib/node",
230228
"npm:buffer@3.2.2/index",
231229
"github:jspm/nodelibs-path@0.1.0/index",
232230
"npm:postcss@4.1.9/lib/container",
233231
"npm:postcss@4.1.9/lib/previous-map",
234232
"npm:postcss-css-variables@0.3.1/index",
235-
"src/js/services/PlaygroundPersistentSettingsDAO",
233+
"npm:promise@5.0.0/core",
236234
"src/js/components/EditorTextarea",
237235
"github:jspm/nodelibs-process@0.1.1",
238236
"npm:react@0.13.2/lib/ReactElement",
@@ -246,14 +244,13 @@ System.config({
246244
"npm:babel-runtime@5.2.6/core-js/object/get-own-property-descriptor",
247245
"npm:lodash.debounce@3.0.3",
248246
"npm:flux@2.0.3",
249-
"npm:promise@5.0.0/index",
250247
"npm:postcss@4.1.9/lib/declaration",
251248
"npm:buffer@3.2.2",
252249
"github:jspm/nodelibs-path@0.1.0",
253250
"npm:postcss@4.1.9/lib/at-rule",
254251
"npm:postcss@4.1.9/lib/input",
255252
"npm:postcss-css-variables@0.3.1",
256-
"src/js/components/PlaygroundHeader",
253+
"npm:promise@5.0.0/index",
257254
"npm:react@0.13.2/lib/invariant",
258255
"npm:react@0.13.2/lib/ReactFragment",
259256
"npm:react@0.13.2/lib/ReactUpdateQueue",
@@ -263,31 +260,32 @@ System.config({
263260
"npm:babel-runtime@5.2.6/helpers/get",
264261
"npm:lodash.throttle@3.0.2/index",
265262
"src/js/dispatcher/AppDispatcher",
266-
"npm:promise@5.0.0",
267263
"github:jspm/nodelibs-buffer@0.1.0/index",
268264
"npm:amdefine@0.1.0/amdefine",
269265
"npm:postcss@4.1.9/lib/parser",
266+
"npm:promise@5.0.0",
270267
"npm:react@0.13.2/lib/keyMirror",
271268
"npm:react@0.13.2/lib/ReactChildren",
272269
"npm:react@0.13.2/lib/ReactComponent",
273270
"npm:react@0.13.2/lib/ReactDOMIDOperations",
274271
"npm:lodash.throttle@3.0.2",
275-
"npm:localforage@1.2.2/src/localforage",
276272
"github:jspm/nodelibs-buffer@0.1.0",
277273
"npm:amdefine@0.1.0",
278274
"npm:postcss@4.1.9/lib/parse",
275+
"npm:localforage@1.2.2/src/localforage",
279276
"npm:react@0.13.2/lib/EventConstants",
280277
"npm:react@0.13.2/lib/ReactComponentBrowserEnvironment",
281-
"npm:localforage@1.2.2",
282278
"npm:js-base64@2.1.8/base64",
283279
"npm:source-map@0.4.2/lib/source-map/source-map-generator",
280+
"npm:localforage@1.2.2",
284281
"npm:react@0.13.2/lib/EventPluginUtils",
285282
"npm:react@0.13.2/lib/ReactDOMTextComponent",
286-
"src/js/stores/PlaygroundSettingsStore",
287283
"npm:js-base64@2.1.8",
288284
"npm:source-map@0.4.2/lib/source-map",
285+
"src/js/services/PlaygroundPersistentSettingsDAO",
289286
"npm:react@0.13.2/lib/React",
290287
"npm:source-map@0.4.2",
288+
"src/js/components/PlaygroundHeader",
291289
"npm:react@0.13.2/react",
292290
"npm:postcss@4.1.9/lib/map-generator",
293291
"npm:react@0.13.2",

playground/gulpfile.js

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,6 @@ var del = require('del');
1515

1616
var jspm = require('jspm');
1717

18-
var cache = require('gulp-cached');
19-
var react = require('gulp-react');
20-
21-
var corepostcss = require('postcss');
22-
var postcss = require('gulp-postcss');
23-
var inlineComments = require('postcss-inline-comment');
24-
var mixins = require('postcss-mixins');
25-
var nestedcss = require('postcss-nested');
26-
var cssvariables = require('postcss-css-variables');
27-
var autoprefixer = require('autoprefixer-core');
28-
2918

3019

3120
var config = {
@@ -50,42 +39,6 @@ gulp.task('build-clean', function(done) {
5039
});
5140

5241

53-
// JSX
54-
gulp.task('jsx', function() {
55-
return gulp.src(config.paths.js)
56-
// Process only changed files
57-
.pipe(cache('jsx'))
58-
.pipe(react({
59-
es6module: true
60-
}))
61-
.pipe(gulp.dest('build/js'));
62-
});
63-
64-
65-
66-
// Compile our PostCSS
67-
gulp.task('postcss', function () {
68-
var processors = [
69-
inlineComments(),
70-
mixins({
71-
mixins: {
72-
'cursor-hand': require('./custom-postcss-mixins/cursor-hand'),
73-
'toggle-checkbox-enclosed': require('./custom-postcss-mixins/toggle-checkbox-enclosed')
74-
}
75-
}),
76-
nestedcss,
77-
cssvariables(),
78-
autoprefixer({browsers: ['last 10 versions']})
79-
];
80-
return gulp.src(config.paths.postcss)
81-
// Process only changed files
82-
.pipe(cache('jsx'))
83-
.pipe(postcss(processors))
84-
.on('error', function (e) {
85-
console.log(e);
86-
})
87-
.pipe(gulp.dest('./build/css'));
88-
});
8942

9043

9144
// Read caniuse-db json and generate a map to paste into the System.js map config.js
@@ -177,16 +130,11 @@ gulp.task('build-finish', function(done) {
177130
});
178131

179132

180-
gulp.task('watch', function(){
181-
//gulp.watch(config.paths.js, ['jsx']);
182-
//gulp.watch(config.paths.postcss, ['postcss']);
183-
});
184-
185133
// Default Task
186134
gulp.task('default', function(callback) {
187135
runSequence(
188136
['build-clean'],
189-
['build-finish', 'watch'],
137+
['build-finish'],
190138
callback
191139
);
192140
});

playground/package.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,14 @@
3636
}
3737
},
3838
"devDependencies": {
39-
"autoprefixer-core": "^5.1.11",
4039
"bluebird": "^2.9.25",
4140
"del": "^1.1.1",
4241
"fs-extra": "^0.18.3",
4342
"glob": "^5.0.5",
4443
"glob2base": "0.0.12",
4544
"gulp": "^3.8.11",
46-
"gulp-cached": "^1.0.4",
47-
"gulp-postcss": "^5.1.4",
48-
"gulp-react": "^3.0.1",
4945
"gulp-util": "^3.0.4",
5046
"jspm": "^0.15.6",
51-
"postcss": "^4.1.8",
52-
"postcss-css-variables": "^0.2.2",
53-
"postcss-inline-comment": "^1.0.3",
54-
"postcss-mixins": "^0.1.1",
55-
"postcss-nested": "^0.2.2",
5647
"run-sequence": "^1.1.0"
5748
},
5849
"scripts": {

playground/src/js/actions/PlaygroundActions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import AppDispatcher from '../dispatcher/AppDispatcher';
22
import PlaygroundConstants from '../constants/PlaygroundConstants';
33

4-
var TodoActions = {
4+
let TodoActions = {
55
keyboardActionFired: function() {
66
AppDispatcher.dispatch({
77
actionType: PlaygroundConstants.PLAYGROUND_KEYBOARD_ACTION

playground/src/js/components/PlaygroundApp.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import EditorTextarea from './EditorTextarea';
1515

1616

1717
function gatherPlaygroundStoreState(props, state) {
18-
var newOutputResult = PlaygroundStore.getOutputResult();
18+
let newOutputResult = PlaygroundStore.getOutputResult();
1919

2020
return {
2121
postcssInputText: PlaygroundStore.getInputText(),
@@ -61,10 +61,10 @@ export default class PlaygroundApp extends React.Component {
6161
render() {
6262
//console.log('render', this.state);
6363

64-
var doesInputHaveError = !!this.state.postcssOutputResult.get('error');
65-
var output = doesInputHaveError ? this.state.prevSuccessfulPostcssOutputResult.get('output') : this.state.postcssOutputResult.get('output');
64+
let doesInputHaveError = !!this.state.postcssOutputResult.get('error');
65+
let output = doesInputHaveError ? this.state.prevSuccessfulPostcssOutputResult.get('output') : this.state.postcssOutputResult.get('output');
6666

67-
var parsingErrorMarkup;
67+
let parsingErrorMarkup;
6868
if(this.state.postcssOutputResult.get('error')) {
6969
parsingErrorMarkup = (
7070
<div
@@ -83,7 +83,7 @@ export default class PlaygroundApp extends React.Component {
8383
}
8484

8585

86-
var tabWidthStyleValue = this.state.tabWidth === 'inherit' ? this.state.tabWidth : this.state.tabWidth + 'ch';
86+
let tabWidthStyleValue = this.state.tabWidth === 'inherit' ? this.state.tabWidth : this.state.tabWidth + 'ch';
8787

8888
return (
8989
<div className="playground-app-wrapper">
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import flux from 'flux';
2-
var Dispatcher = flux.Dispatcher;
2+
let Dispatcher = flux.Dispatcher;
33

4-
var AppDispatcher = new Dispatcher();
4+
let AppDispatcher = new Dispatcher();
55

66
export default AppDispatcher;

playground/src/js/lib/deferred-promise.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import Promise from 'bluebird';
22

33
function deferredPromise() {
4-
var resolve, reject;
5-
var promise = new Promise(function() {
4+
let resolve, reject;
5+
let promise = new Promise(function() {
66
resolve = arguments[0];
77
reject = arguments[1];
88
});

playground/src/js/services/PlaygroundPersistentSettingsDAO.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ let playgroundSettingsStoreTypeKeys = {
1717
pluginSettings: 'PlaygroundSettingsStore.PluginSettings'
1818
};
1919

20-
let actionMap = {};
21-
actionMap[playgroundSettingsStoreTypeKeys.playgroundSettings] = {
22-
shouldLiveReload: PlaygroundActions.setShouldLiveReloadOption,
23-
tabWidth: PlaygroundActions.setTabWidthOption
24-
};
25-
actionMap[playgroundSettingsStoreTypeKeys.pluginSettings] = {
26-
'postcss-css-variables': {
27-
preserve: PlaygroundActions.setPostcssCssVariablesPreserveOption
20+
let actionMap = {
21+
[playgroundSettingsStoreTypeKeys.playgroundSettings]: {
22+
shouldLiveReload: PlaygroundActions.setShouldLiveReloadOption,
23+
tabWidth: PlaygroundActions.setTabWidthOption
24+
},
25+
[playgroundSettingsStoreTypeKeys.pluginSettings]: {
26+
'postcss-css-variables': {
27+
preserve: PlaygroundActions.setPostcssCssVariablesPreserveOption
28+
}
2829
}
2930
};
3031

@@ -37,7 +38,7 @@ function iterateOverObjectRecursively(obj, cb, _originalObj, _path) {
3738
// http://facebook.github.io/immutable-js/docs/#/Map/isMap
3839
let isMap = Immutable.Map.isMap(obj);
3940

40-
var iteratingFunc = isMap ? Immutable.Map.prototype.mapKeys.bind(obj) : Array.prototype.forEach.bind(Object.keys(obj));
41+
let iteratingFunc = isMap ? Immutable.Map.prototype.mapKeys.bind(obj) : Array.prototype.forEach.bind(Object.keys(obj));
4142
iteratingFunc((key) => {
4243
let value = isMap ? obj.get(key) : obj[key];
4344
let currentPath = _path.concat(key);

playground/src/js/stores/PlaygroundSettingsStore.js

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,27 @@ import PlaygroundConstants from '../constants/PlaygroundConstants';
44
import assign from 'object-assign';
55
import Immutable from 'immutable';
66
import events from 'events';
7-
var EventEmitter = events.EventEmitter;
8-
import localforage from 'localforage';
7+
let EventEmitter = events.EventEmitter;
98

10-
import Promise from 'bluebird';
11-
import deferredPromise from '../lib/deferred-promise';
129

10+
let CHANGE_EVENT = 'CHANGE_EVENT';
1311

14-
localforage.config({
15-
name : 'postcss-css-variables-playground',
16-
version : 1.0,
17-
storeName : 'postcss-css-variables-playground-settings'
18-
});
19-
20-
var CHANGE_EVENT = 'CHANGE_EVENT';
21-
22-
23-
var isSettingsInitializedDeferredPromise = deferredPromise();
2412

2513

26-
var playgroundSettings = Immutable.Map({
14+
let playgroundSettings = Immutable.Map({
2715
shouldLiveReload: true,
2816
tabWidth: 'inherit'
2917
});
3018

31-
var pluginSettings = Immutable.Map({
19+
let pluginSettings = Immutable.Map({
3220
'postcss-css-variables': Immutable.Map({
3321
preserve: false
3422
})
3523
});
3624

3725

3826

39-
var PlaygroundSettingsStore = assign({}, EventEmitter.prototype, {
40-
41-
42-
getIsSettingsInitializedPromise: function() {
43-
return isSettingsInitializedDeferredPromise.promise;
44-
},
27+
let PlaygroundSettingsStore = assign({}, EventEmitter.prototype, {
4528

4629

4730
getPluginSettings: function() {

0 commit comments

Comments
 (0)