Skip to content

Commit 8c3d478

Browse files
authored
Merge pull request #107 from cabreraalex/master
skip npm build for install
2 parents d109862 + 0c5f70a commit 8c3d478

File tree

1 file changed

+4
-2
lines changed
  • {{cookiecutter.github_project_name}}

1 file changed

+4
-2
lines changed

{{cookiecutter.github_project_name}}/setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
ensure_targets,
1818
combine_commands,
1919
get_version,
20+
skip_if_exists
2021
)
2122

2223
HERE = os.path.dirname(os.path.abspath(__file__))
@@ -34,7 +35,7 @@
3435
# Representative files that should exist after a successful build
3536
jstargets = [
3637
pjoin(HERE, name, 'nbextension', 'index.js'),
37-
pjoin(HERE, 'lib', 'plugin.js'),
38+
pjoin(HERE, name, 'labextension', 'package.json'),
3839
]
3940

4041

@@ -56,10 +57,11 @@
5657

5758
cmdclass = create_cmdclass('jsdeps', package_data_spec=package_data_spec,
5859
data_files_spec=data_files_spec)
59-
cmdclass['jsdeps'] = combine_commands(
60+
npm_install = combine_commands(
6061
install_npm(HERE, build_cmd='build:prod'),
6162
ensure_targets(jstargets),
6263
)
64+
cmdclass['jsdeps'] = skip_if_exists(jstargets, npm_install)
6365

6466

6567
setup_args = dict(

0 commit comments

Comments
 (0)