ripple 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/package.json +56 -24
- package/src/ai.js +292 -0
- package/src/compiler/errors.js +26 -0
- package/src/compiler/index.js +26 -0
- package/src/compiler/phases/1-parse/index.js +543 -0
- package/src/compiler/phases/1-parse/style.js +566 -0
- package/src/compiler/phases/2-analyze/index.js +509 -0
- package/src/compiler/phases/2-analyze/prune.js +572 -0
- package/src/compiler/phases/3-transform/index.js +1572 -0
- package/src/compiler/phases/3-transform/segments.js +91 -0
- package/src/compiler/phases/3-transform/stylesheet.js +372 -0
- package/src/compiler/scope.js +421 -0
- package/src/compiler/utils.js +552 -0
- package/src/constants.js +4 -0
- package/src/jsx-runtime.d.ts +94 -0
- package/src/jsx-runtime.js +46 -0
- package/src/runtime/array.js +215 -0
- package/src/runtime/index.js +39 -0
- package/src/runtime/internal/client/blocks.js +247 -0
- package/src/runtime/internal/client/constants.js +23 -0
- package/src/runtime/internal/client/events.js +223 -0
- package/src/runtime/internal/client/for.js +388 -0
- package/src/runtime/internal/client/if.js +35 -0
- package/src/runtime/internal/client/index.js +53 -0
- package/src/runtime/internal/client/operations.js +72 -0
- package/src/runtime/internal/client/portal.js +33 -0
- package/src/runtime/internal/client/render.js +156 -0
- package/src/runtime/internal/client/runtime.js +909 -0
- package/src/runtime/internal/client/template.js +51 -0
- package/src/runtime/internal/client/try.js +139 -0
- package/src/runtime/internal/client/utils.js +16 -0
- package/src/utils/ast.js +214 -0
- package/src/utils/builders.js +733 -0
- package/src/utils/patterns.js +23 -0
- package/src/utils/sanitize_template_string.js +7 -0
- package/test-mappings.js +0 -0
- package/types/index.d.ts +2 -0
- package/.npmignore +0 -2
- package/History.md +0 -3
- package/Readme.md +0 -151
- package/lib/exec/index.js +0 -60
- package/ripple.js +0 -645
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const regex_whitespace = /\s/;
|
|
2
|
+
export const regex_whitespaces = /\s+/;
|
|
3
|
+
export const regex_starts_with_newline = /^\r?\n/;
|
|
4
|
+
export const regex_starts_with_whitespace = /^\s/;
|
|
5
|
+
export const regex_starts_with_whitespaces = /^[ \t\r\n]+/;
|
|
6
|
+
export const regex_ends_with_whitespace = /\s$/;
|
|
7
|
+
export const regex_ends_with_whitespaces = /[ \t\r\n]+$/;
|
|
8
|
+
/** Not \S because that also removes explicit whitespace defined through things like ` ` */
|
|
9
|
+
export const regex_not_whitespace = /[^ \t\r\n]/;
|
|
10
|
+
/** Not \s+ because that also includes explicit whitespace defined through things like ` ` */
|
|
11
|
+
export const regex_whitespaces_strict = /[ \t\n\r\f]+/g;
|
|
12
|
+
|
|
13
|
+
export const regex_only_whitespaces = /^[ \t\n\r\f]+$/;
|
|
14
|
+
|
|
15
|
+
export const regex_not_newline_characters = /[^\n]/g;
|
|
16
|
+
|
|
17
|
+
export const regex_is_valid_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
|
18
|
+
// used in replace all to remove all invalid chars from a literal identifier
|
|
19
|
+
export const regex_invalid_identifier_chars = /(^[^a-zA-Z_$]|[^a-zA-Z0-9_$])/g;
|
|
20
|
+
|
|
21
|
+
export const regex_starts_with_vowel = /^[aeiou]/;
|
|
22
|
+
export const regex_heading_tags = /^h[1-6]$/;
|
|
23
|
+
export const regex_illegal_attribute_character = /(^[0-9-.])|[\^$@%&#?!|()[\]{}^*+~;]/;
|
package/test-mappings.js
ADDED
|
File without changes
|
package/types/index.d.ts
ADDED
package/.npmignore
DELETED
package/History.md
DELETED
package/Readme.md
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
# Ripple
|
|
2
|
-
|
|
3
|
-
## Command line git repository & branch manager
|
|
4
|
-
|
|
5
|
-
Ripple was inspired by and does it's best to adhere to the principals described in Vincent Driessen's excellent blog post; [A successful Git branching model](http://nvie.com/posts/a-successful-git-branching-model/).
|
|
6
|
-
|
|
7
|
-
By automating and enforcing a strict yet very logical branching model, ripple both makes working with your git repository easier as well as more robust and well documented at the same time.
|
|
8
|
-
|
|
9
|
-
## Installation
|
|
10
|
-
|
|
11
|
-
npm install -g ripple
|
|
12
|
-
|
|
13
|
-
## What it can do for you
|
|
14
|
-
|
|
15
|
-
Ripple will make your branch model simple, consistent, repeatable, and descriptive. If you are an individual developer, it will help you stay organized. If you work as part of a team, it will work wonders on keeping your team on the same page, and keeping you from tripping over each other.
|
|
16
|
-
|
|
17
|
-
* Create a new git repository from scratch, with appropriate tree structure.
|
|
18
|
-
* Create a new package.json and start managing an existing get repo / project.
|
|
19
|
-
* Create "feature" branches, from other feature branches or from "develop".
|
|
20
|
-
* Create "release" and "hotfix" branches with automated versioning.
|
|
21
|
-
* Integrate release and hotfix branches for release, by properly merging them back into your master and development branches.
|
|
22
|
-
* Smartly integrate hotfix branches into an existing release branch rather than develop, if one exists, and
|
|
23
|
-
* Automatically advance version on release branch if a hotfix was required during a release cycle.
|
|
24
|
-
* Automatically tag releases with the correct integration version number.
|
|
25
|
-
* Keep you adhered to the principals outlined in "A successful git branching model".
|
|
26
|
-
* No more than one active hotfix
|
|
27
|
-
* Make sure you apply hotfixes and releases in the correct order
|
|
28
|
-
|
|
29
|
-
## Examples
|
|
30
|
-
|
|
31
|
-
All examples below show the branch that is currently checked out within the prompt.
|
|
32
|
-
|
|
33
|
-
### Create a new project from scratch
|
|
34
|
-
|
|
35
|
-
iMac:test cscade $ ripple init test
|
|
36
|
-
Initializing new ripple project
|
|
37
|
-
creating new git repository where there was none
|
|
38
|
-
creating new package.json on "master" for project test version 0.0.1
|
|
39
|
-
commiting package.json
|
|
40
|
-
creating new "develop" branch
|
|
41
|
-
ok.
|
|
42
|
-
|
|
43
|
-
### Work on a feature
|
|
44
|
-
|
|
45
|
-
iMac:Ripple cscade [develop] $ ripple start feature docs
|
|
46
|
-
Starting feature branch
|
|
47
|
-
creating new docs branch from "develop"
|
|
48
|
-
ok.
|
|
49
|
-
|
|
50
|
-
... do stuff, commit things ...
|
|
51
|
-
|
|
52
|
-
iMac:Ripple cscade [docs] $ ripple finish feature
|
|
53
|
-
Finishing feature branch
|
|
54
|
-
merging docs into develop
|
|
55
|
-
removing docs branch
|
|
56
|
-
ok.
|
|
57
|
-
|
|
58
|
-
### Create a release
|
|
59
|
-
|
|
60
|
-
iMac:Ripple cscade [develop] $ ripple start release
|
|
61
|
-
Starting release branch
|
|
62
|
-
creating new release branch from "develop"
|
|
63
|
-
updating version: 0.0.12 -> 0.0.13
|
|
64
|
-
commiting changes
|
|
65
|
-
[release-0.0.13 357f066] bump version to 0.0.13
|
|
66
|
-
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
67
|
-
ok.
|
|
68
|
-
|
|
69
|
-
... polish, update your docs, etc ...
|
|
70
|
-
|
|
71
|
-
iMac:Ripple cscade [release-0.0.13] $ ripple finish release
|
|
72
|
-
Finishing release branch
|
|
73
|
-
merging release-0.0.13 into master
|
|
74
|
-
tagging version 0.0.13 on master
|
|
75
|
-
merging release-0.0.13 into develop
|
|
76
|
-
removing release-0.0.13 branch
|
|
77
|
-
ok.
|
|
78
|
-
|
|
79
|
-
## Help
|
|
80
|
-
|
|
81
|
-
iMac:Ripple cscade $ ripple wtf
|
|
82
|
-
|
|
83
|
-
Usage: ripple [options] [command]
|
|
84
|
-
|
|
85
|
-
Commands:
|
|
86
|
-
|
|
87
|
-
status
|
|
88
|
-
Output current status of the active project.
|
|
89
|
-
|
|
90
|
-
start <type> [name]
|
|
91
|
-
Create a new branch of type "feature", "release", or "hotfix".
|
|
92
|
-
If it's a feature branch, provide a name.
|
|
93
|
-
|
|
94
|
-
bump <part>
|
|
95
|
-
Bump version number while on a release branch.
|
|
96
|
-
Specify "major", "minor", or "revision".
|
|
97
|
-
|
|
98
|
-
finish <type>
|
|
99
|
-
Finish and merge the current release or hotfix branch.
|
|
100
|
-
Specify "feature", "release", or "hotfix".
|
|
101
|
-
Always commits!
|
|
102
|
-
|
|
103
|
-
init <name> [version]
|
|
104
|
-
Initialize a ripple project here (creating a repository if needed), with the given project name and version number. [0.0.1]
|
|
105
|
-
|
|
106
|
-
*
|
|
107
|
-
|
|
108
|
-
Options:
|
|
109
|
-
|
|
110
|
-
-h, --help output usage information
|
|
111
|
-
-p, --package <location> Relative path of package.json file to modify [./package.json]
|
|
112
|
-
-x, --no-commit Do not commit version changes automatically
|
|
113
|
-
-d, --debug show debug output
|
|
114
|
-
-v, --verbose show verbose git output
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
## Where it's meant to work
|
|
119
|
-
|
|
120
|
-
Ripple makes the following assumptions about your environment:
|
|
121
|
-
|
|
122
|
-
* You have `node.js` & `npm`
|
|
123
|
-
* You use git
|
|
124
|
-
* Projects have a package.json file containing at least "name" and "version" keys
|
|
125
|
-
|
|
126
|
-
That's it. Projects can be in any language, and contain anything git can handle. Ripple is available as a global executable in your terminal just like git, and uses git-like command options.
|
|
127
|
-
|
|
128
|
-
## License
|
|
129
|
-
|
|
130
|
-
(The MIT License)
|
|
131
|
-
|
|
132
|
-
Copyright (c) 2011 Carson Christian <cc@amplego.com>
|
|
133
|
-
|
|
134
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
135
|
-
a copy of this software and associated documentation files (the
|
|
136
|
-
'Software'), to deal in the Software without restriction, including
|
|
137
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
138
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
139
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
140
|
-
the following conditions:
|
|
141
|
-
|
|
142
|
-
The above copyright notice and this permission notice shall be
|
|
143
|
-
included in all copies or substantial portions of the Software.
|
|
144
|
-
|
|
145
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
146
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
147
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
148
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
149
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
150
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
151
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/lib/exec/index.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* exec/index.js
|
|
3
|
-
* Ripple
|
|
4
|
-
*
|
|
5
|
-
* Created by Carson Christian on 2011-12-29.
|
|
6
|
-
* Copyright 2011 (ampl)EGO. All rights reserved.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* exec library
|
|
11
|
-
*
|
|
12
|
-
* Automatically queues calls to exec, and guarantees execution order.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
var systemExec = require('child_process').exec,
|
|
16
|
-
cli;
|
|
17
|
-
|
|
18
|
-
var Exec = function () {
|
|
19
|
-
this.queue = [];
|
|
20
|
-
this.fresh = true;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
Exec.prototype.send = function (args, next) {
|
|
24
|
-
var that = this;
|
|
25
|
-
|
|
26
|
-
if (!this.running) {
|
|
27
|
-
process.nextTick(function () {
|
|
28
|
-
that.fresh = false;
|
|
29
|
-
that.next();
|
|
30
|
-
});
|
|
31
|
-
this.running = true;
|
|
32
|
-
}
|
|
33
|
-
if (typeof next !== 'function') throw new Error('exec: You cannot send() without a callback.');
|
|
34
|
-
this.queue.unshift([args, next]);
|
|
35
|
-
return this;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
Exec.prototype.go = function (queueObj) {
|
|
39
|
-
var that = this;
|
|
40
|
-
|
|
41
|
-
if (queueObj) {
|
|
42
|
-
if (cli.debug) console.error('debug:'.grey.inverse + ' [queue #%s] exec: "%s"', this.queue.length + 1, queueObj[0].bold);
|
|
43
|
-
systemExec(queueObj[0], function (e, stdout, stderr) { queueObj[1](e, function () { that.next(); }, stdout, stderr); });
|
|
44
|
-
} else {
|
|
45
|
-
if (cli.debug) console.error('debug warning:'.red.inverse + ' go called with no job. Look for an errant "next();".');
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
Exec.prototype.next = function () {
|
|
50
|
-
if (this.fresh) throw new Error('exec: Do not call next() programmatically. Execution will begin automatically on nextTick.');
|
|
51
|
-
this.go(this.queue.pop());
|
|
52
|
-
if (this.queue.length === 0) {
|
|
53
|
-
this.running = false;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
module.exports = function (cliInstance) {
|
|
58
|
-
cli = cliInstance;
|
|
59
|
-
return Exec;
|
|
60
|
-
};
|