File tree 2 files changed +27
-0
lines changed
2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
4
+ * This code may only be used under the BSD style license found at
5
+ * http://polymer.github.io/LICENSE.txt
6
+ * The complete set of authors may be found at
7
+ * http://polymer.github.io/AUTHORS.txt
8
+ * The complete set of contributors may be found at
9
+ * http://polymer.github.io/CONTRIBUTORS.txt
10
+ * Code distributed by Google as part of the polymer project is also
11
+ * subject to an additional IP rights grant found at
12
+ * http://polymer.github.io/PATENTS.txt
13
+ */
14
+
15
+ const fs = require ( 'fs' ) ;
16
+ const path = require ( 'path' ) ;
17
+
18
+ const version = require ( path . join ( __dirname , 'package.json' ) ) . version ;
19
+ const ts = fs . readFileSync ( path . join ( __dirname , 'src' , 'lit-html.ts' ) ) ;
20
+ if ( ! ts . includes ( version ) ) {
21
+ console . log (
22
+ `\nExpected lit-html.ts to contain current version "${ version } "` ) ;
23
+ console . log (
24
+ `Don't forget to update the version tracker string before release!` ) ;
25
+ process . exit ( 1 ) ;
26
+ }
Original file line number Diff line number Diff line change 28
28
"quicktest" : " wct -l chrome -p --npm" ,
29
29
"format" : " clang-format --version; find src test | grep '\\ .js$\\ |\\ .ts$' | xargs clang-format --style=file -i" ,
30
30
"lint" : " tslint --project ./" ,
31
+ "prepublishOnly" : " node check-version-tracker.js && npm run lint && npm test" ,
31
32
"prepare" : " npm run build" ,
32
33
"publish-dev" : " npm test && VERSION=${npm_package_version%-*}-dev.`git rev-parse --short HEAD` && npm version --no-git-tag-version $VERSION && npm publish --tag dev"
33
34
},
You can’t perform that action at this time.
0 commit comments