Skip to content

Commit 0a67d38

Browse files
committed
Add a dev dependency on fibers from NPM
1 parent 7178a91 commit 0a67d38

File tree

6 files changed

+22
-7
lines changed

6 files changed

+22
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ packages
88
.packages
99
pubspec.lock
1010
/benchmark/source
11+
node_modules/

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ install:
4343
- if-node . "$HOME/.nvm/nvm.sh"
4444
- if-node nvm install "$NODE_VERSION"
4545
- if-node nvm use "$NODE_VERSION"
46-
- SASS_MINIFY_JS=false if-node pub run grinder npm_package
46+
- SASS_MINIFY_JS=false if-node pub run grinder before_test
4747

4848
# Download sass-spec and install its dependencies if we're running specs.
4949
- if-specs() { if [ "$TASK" = specs ]; then "$@"; fi }

package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"//": [
3+
"This isn't the official package.json for Dart Sass. It's just used to ",
4+
"install dependencies used for testing the Node API."
5+
],
6+
"devDependencies": {
7+
"fibers": ">=1.0.0 <3.0.0"
8+
}
9+
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ dev_dependencies:
3636
stream_channel: "^1.0.0"
3737
test_descriptor: "^1.0.0"
3838
test_process: "^1.0.0-rc.1"
39-
test: "^0.12.26"
39+
test: "^0.12.29"
4040
xml: "^2.4.0"
4141
yaml: "^2.0.0"

test/ensure_npm_package.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ hybridMain(StreamChannel channel) async {
3232
var entryLastModified = entry.lastModifiedSync();
3333
if (lastModified.isBefore(entryLastModified)) {
3434
throw "${entry.path} was modified after NPM package was generated.\n"
35-
"Run pub run grinder npm_package.";
35+
"Run pub run grinder before_test.";
3636
}
3737
}
3838
}

tool/grind.dart

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ final _sdkDir = p.dirname(p.dirname(Platform.resolvedExecutable));
3838
main(List<String> args) => grind(args);
3939

4040
@DefaultTask('Compile async code and reformat.')
41-
all() {
42-
format();
43-
synchronize();
44-
}
41+
@Depends(format, synchronize)
42+
all() {}
4543

4644
@Task('Run the Dart formatter.')
4745
format() {
@@ -100,6 +98,13 @@ npm_package() {
10098
_writeNpmPackage('build/npm-old', json..addAll({"name": "dart-sass"}));
10199
}
102100

101+
@Task('Installs dependencies from npm.')
102+
npm_install() => run("npm", arguments: ["install"]);
103+
104+
@Task('Runs the tasks that are required for running tests.')
105+
@Depends(npm_package, npm_install)
106+
before_test() {}
107+
103108
/// Writes a Dart Sass NPM package to the directory at [destination].
104109
///
105110
/// The [json] will be used as the package's package.json.

0 commit comments

Comments
 (0)