Skip to content

Commit 905b96d

Browse files
committed
Update build process to babel 7, gulp 4, rollup 1.6
1 parent 50c7f68 commit 905b96d

File tree

8 files changed

+377
-7935
lines changed

8 files changed

+377
-7935
lines changed

dev/sass/styles.scss

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
align-items: center;
44
padding: 0 $pad 0 $pad;
55
flex: 0 $title-height;
6-
6+
77
h1 {
88
flex: 1;
99
}
@@ -15,16 +15,16 @@
1515

1616
&:not(.inactive) {
1717
cursor: pointer;
18-
18+
1919
&:hover {
2020
color: $lightest;
21-
21+
2222
svg.icon {
2323
color: currentColor;
2424
}
2525
}
2626
}
27-
27+
2828
svg.icon {
2929
transition: fill $transition-t;
3030
}
@@ -62,13 +62,13 @@ html, body {
6262

6363
// This shouldn't be necessary if everything is working correctly
6464
// overflow: hidden;
65-
65+
6666
> .container {
6767
/* wraps all content, since flex layouts don't work reliably on body */
6868
height: 100%;
6969
display: flex;
7070
flex-flow: column;
71-
71+
7272
> .app {
7373
/* wraps the sidebar and doc */
7474
flex: 1;
@@ -108,7 +108,7 @@ h1, h2 {
108108
flex-direction: column;
109109
margin: 0;
110110
padding: 0;
111-
111+
112112
li {
113113
display: block;
114114
}
@@ -143,8 +143,8 @@ span.error {
143143
from {
144144
transform: rotate(0deg);
145145
}
146-
146+
147147
to {
148148
transform: rotate(360deg);
149149
}
150-
}
150+
}

dev/src/RegExr.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import Prefs from "./helpers/Prefs";
4141

4242
export default class RegExr extends EventDispatcher {
4343
constructor () { super(); }
44-
44+
4545
init(state, account, config={}) {
4646
this.prefs = new Prefs();
4747
this.flavor = new Flavor();
@@ -64,7 +64,7 @@ export default class RegExr extends EventDispatcher {
6464
if (params.expression) { this.expression.value = params.expression; }
6565
if (params.text) { this.text.value = params.text; }
6666
if (params.tool) { this.tools.value = {id:params.tool, input:params.input}; }
67-
67+
6868
window.onbeforeunload = (e) => this.unsaved ? "You have unsaved changes." : null;
6969
this.resetUnsaved();
7070

@@ -83,7 +83,7 @@ export default class RegExr extends EventDispatcher {
8383
//Server.verify().then((data) => this.account.value = data);
8484
new RefCoverage();
8585
}
86-
86+
8787
// getter / setters:
8888
get state() {
8989
let o = {
@@ -95,7 +95,7 @@ export default class RegExr extends EventDispatcher {
9595
// copy share values onto the pattern object:
9696
return Utils.copy(this.share.value, o);
9797
}
98-
98+
9999
set state(o) {
100100
if (!o) { return; }
101101
this.flavor.value = o.flavor;
@@ -130,7 +130,7 @@ export default class RegExr extends EventDispatcher {
130130
resetUnsaved() {
131131
this._savedHash = this.hash;
132132
}
133-
133+
134134
newDoc(warn=true) {
135135
this.load({flavor: this.flavor.value, expression: ".", text:"Text"}, warn);
136136
this.expression.selectAll();
@@ -141,7 +141,7 @@ export default class RegExr extends EventDispatcher {
141141
if (warn && this.unsaved && !confirm(warn)) { return; }
142142
this.state = Utils.clone(state);
143143
}
144-
144+
145145
// private methods:
146146
_initUI() {
147147
// TODO: break into own Device class? Rename mobile.scss too?
@@ -162,16 +162,16 @@ export default class RegExr extends EventDispatcher {
162162
};
163163

164164
this.theme = new Theme(this.el);
165-
165+
166166
let el = $.query(".app > .doc", this.el);
167167
this.expression = new Expression($.query("> section.expression", el));
168168
this.text = new Text($.query("> section.text", el));
169169
this.tools = new Tools($.query("> section.tools", el));
170-
170+
171171
this.account = new Account();
172172
this.sidebar = new Sidebar($.query(".app > .sidebar", this.el));
173173
this.share = this.sidebar.share;
174-
174+
175175
this.expression.on("change", ()=> this._change());
176176
this.text.on("change", ()=> this._change());
177177
this.flavor.on("change", ()=> this._change());
@@ -193,20 +193,20 @@ export default class RegExr extends EventDispatcher {
193193
if (!ids.length) { ls.setItem("f_v3", "1"); return; }
194194
Server.multiFavorite(ids).then(() => ls.setItem("f_v3", "1"));
195195
}
196-
196+
197197
_change() {
198198
this.dispatchEvent("change");
199199
var solver = this.flavor.solver, exp = this.expression;
200200
solver.solve({pattern:exp.pattern, flags:exp.flags, text:this.text.value, tool:this.tools.value}, (result) => this._handleResult(result));
201201
}
202-
202+
203203
_handleResult(result) {
204204
this.result = this._processResult(result);;
205205
this.dispatchEvent("result");
206206
}
207-
207+
208208
_processResult(result) {
209209
result.matches && result.matches.forEach((o, i)=>o.num=i);
210210
return result;
211211
}
212-
}
212+
}

dev/src/docs/sidebar_content.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ home.label = "Menu";
2424
home.desc = "[from HTML]";
2525
home.kids = [
2626

27-
27+
2828
{
2929
label: "Pattern Settings",
3030
id: "share",
3131
el: "#share_main",
3232
list: false,
3333
kids: [
3434
{
35-
label: "Save to my Favorites",
35+
label: "Save to my Favorites",
3636
id: "share_favorites",
3737
el:"#share_favorites"
3838
},
@@ -43,7 +43,7 @@ home.kids = [
4343
}
4444
]
4545
},
46-
46+
4747
{
4848
label: "My Patterns",
4949
id:"favorites",
@@ -52,17 +52,17 @@ home.kids = [
5252
search: true,
5353
kids: []
5454
},
55-
55+
5656
{
5757
label: "Cheatsheet",
5858
id:"cheatsheet",
5959
el: "#cheatsheet"
6060
},
61-
61+
6262
{ // injected from Reference
6363
id:"reference"
6464
},
65-
65+
6666
{
6767
label: "Community Patterns",
6868
id: "community",
@@ -81,7 +81,7 @@ home.kids = [
8181

8282
{
8383
label:"About",
84-
desc:"RegExr v[build-version] ([build-date])."+
84+
desc:"RegExr v<%= build-version %> (<%= build-date %>)."+
8585
"<p>Created by <a href='http://twitter.com/gskinner/' target='_blank'>Grant Skinner</a> and the <a href='http://gskinner.com/' target='_blank'>gskinner</a> team, using the <a href='http://createjs.com/' target='_blank'>CreateJS</a> & <a href='http://codemirror.net/' target='_blank'>CodeMirror</a> libraries.</p>"+
8686
"<p>You can provide feedback or log bugs on <a href='http://github.com/gskinner/regexr/' target='_blank'>GitHub</a>.</p>"
8787
},
@@ -195,4 +195,4 @@ home.kids = [
195195
}
196196
]
197197
}
198-
];
198+
];

0 commit comments

Comments
 (0)