Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dart.googlesource.com-stagehand
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fuchsia-mirror
dart.googlesource.com-stagehand
Commits
dc8b25da
Commit
dc8b25da
authored
8 years ago
by
Kevin Moore
Browse files
Options
Downloads
Patches
Plain Diff
update dependencies
parent
34e583b8
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/src/common.dart
+5
-5
5 additions, 5 deletions
lib/src/common.dart
pubspec.yaml
+3
-4
3 additions, 4 deletions
pubspec.yaml
tool/grind.dart
+20
-3
20 additions, 3 deletions
tool/grind.dart
with
28 additions
and
12 deletions
lib/src/common.dart
+
5
−
5
View file @
dc8b25da
...
@@ -6,9 +6,7 @@
...
@@ -6,9 +6,7 @@
* Some utility methods for stagehand.
* Some utility methods for stagehand.
*/
*/
import
'dart:convert'
show
UTF8
;
import
'dart:convert'
show
BASE64
,
UTF8
;
import
'package:crypto/crypto.dart'
;
import
'../stagehand.dart'
;
import
'../stagehand.dart'
;
...
@@ -17,15 +15,17 @@ const int _RUNE_SPACE = 32;
...
@@ -17,15 +15,17 @@ const int _RUNE_SPACE = 32;
final
_substitueRegExp
=
new
RegExp
(
r'__([a-zA-Z]+)__'
);
final
_substitueRegExp
=
new
RegExp
(
r'__([a-zA-Z]+)__'
);
final
_nonValidSubstitueRegExp
=
new
RegExp
(
'[^a-zA-Z]'
);
final
_nonValidSubstitueRegExp
=
new
RegExp
(
'[^a-zA-Z]'
);
final
_whiteSpace
=
new
RegExp
(
r'\s+'
);
List
<
TemplateFile
>
decodeConcatenatedData
(
List
<
String
>
data
)
{
List
<
TemplateFile
>
decodeConcatenatedData
(
List
<
String
>
data
)
{
List
<
TemplateFile
>
results
=
[];
List
<
TemplateFile
>
results
=
[];
for
(
int
i
=
0
;
i
<
data
.
length
;
i
+=
3
)
{
for
(
int
i
=
0
;
i
<
data
.
length
;
i
+=
3
)
{
String
path
=
data
[
i
];
String
path
=
data
[
i
];
String
type
=
data
[
i
+
1
];
String
type
=
data
[
i
+
1
];
String
raw
=
data
[
i
+
2
];
String
raw
=
data
[
i
+
2
]
.
replaceAll
(
_whiteSpace
,
''
)
;
List
<
int
>
decoded
=
CryptoUtils
.
base64StringToBytes
(
raw
);
List
<
int
>
decoded
=
BASE64
.
decode
(
raw
);
if
(
type
==
'binary'
)
{
if
(
type
==
'binary'
)
{
results
.
add
(
new
TemplateFile
.
fromBinary
(
path
,
decoded
));
results
.
add
(
new
TemplateFile
.
fromBinary
(
path
,
decoded
));
...
...
This diff is collapsed.
Click to expand it.
pubspec.yaml
+
3
−
4
View file @
dc8b25da
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
name
:
stagehand
name
:
stagehand
# When changing this version, change the lib/src/cli_app.dart version as well.
# When changing this version, change the lib/src/cli_app.dart version as well.
version
:
1.0.
9
version
:
1.0.
10-dev
description
:
>
description
:
>
A scaffolding generator for your Dart projects. Stagehand helps you get set
A scaffolding generator for your Dart projects. Stagehand helps you get set
up!
up!
...
@@ -15,7 +15,7 @@ authors:
...
@@ -15,7 +15,7 @@ authors:
-
Kathy Walrath <kathyw@google.com>
-
Kathy Walrath <kathyw@google.com>
environment
:
environment
:
sdk
:
'
>=1.
9
.0
<2.0.0'
sdk
:
'
>=1.
13
.0
<2.0.0'
# Add the bin/stagehand.dart script to the scripts pub installs.
# Add the bin/stagehand.dart script to the scripts pub installs.
executables
:
executables
:
...
@@ -23,14 +23,13 @@ executables:
...
@@ -23,14 +23,13 @@ executables:
dependencies
:
dependencies
:
args
:
'
>=0.12.0+1
<0.14.0'
args
:
'
>=0.12.0+1
<0.14.0'
crypto
:
^0.9.0
http
:
^0.11.0
http
:
^0.11.0
path
:
^1.3.0
path
:
^1.3.0
usage
:
^1.0.0
usage
:
^1.0.0
dev_dependencies
:
dev_dependencies
:
browser
:
^0.10.0
browser
:
^0.10.0
ghpages_generator
:
^0.
2.4
ghpages_generator
:
^0.
3.0
grinder
:
^0.8.0
grinder
:
^0.8.0
test
:
^0.12.0
test
:
^0.12.0
yaml
:
^2.1.2
yaml
:
^2.1.2
This diff is collapsed.
Click to expand it.
tool/grind.dart
+
20
−
3
View file @
dc8b25da
...
@@ -3,8 +3,9 @@
...
@@ -3,8 +3,9 @@
// license that can be found in the LICENSE file.
// license that can be found in the LICENSE file.
import
'dart:io'
;
import
'dart:io'
;
import
'dart:convert'
;
import
'dart:math'
as
math
;
import
'package:crypto/crypto.dart'
;
import
'package:ghpages_generator/ghpages_generator.dart'
as
ghpages
;
import
'package:ghpages_generator/ghpages_generator.dart'
as
ghpages
;
import
'package:grinder/grinder.dart'
;
import
'package:grinder/grinder.dart'
;
import
'package:path/path.dart'
as
path
;
import
'package:path/path.dart'
as
path
;
...
@@ -95,8 +96,24 @@ Iterable<String> _traverse(Directory dir, String root) sync* {
...
@@ -95,8 +96,24 @@ Iterable<String> _traverse(Directory dir, String root) sync* {
}
else
{
}
else
{
yield
'
${root}${name}
'
;
yield
'
${root}${name}
'
;
yield
_isBinaryFile
(
name
)
?
'binary'
:
'text'
;
yield
_isBinaryFile
(
name
)
?
'binary'
:
'text'
;
yield
BASE64
.
encode
((
entity
as
File
)
.
readAsBytesSync
(),
addLineSeparator:
true
);
var
encoded
=
BASE64
.
encode
((
entity
as
File
)
.
readAsBytesSync
());
//
// Logic to cut lines into 76-character chunks
// – makes for prettier source code
//
var
lines
=
<
String
>[];
var
index
=
0
;
while
(
index
<
encoded
.
length
)
{
var
line
=
encoded
.
substring
(
index
,
math
.
min
(
index
+
76
,
encoded
.
length
));
lines
.
add
(
line
);
index
+=
line
.
length
;
}
yield
lines
.
join
(
'
\r\n
'
);
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment