Skip to content

Loading…

Suppress npm warnings #7

Merged
merged 2 commits into from

2 participants

@ninjudd

This makes the node package private by default, which suppresses the following warning:

npm WARN package.json myproject@0.1.0 No repository field.

This also suppresses the warning from npm if there is no README, which comes up when using the feature in my other pull request:

npm WARN package.json myproject@0.1.0 No README data
@bodil bodil merged commit ce1863e into RyanMcG:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 6 deletions.
  1. +1 −1 project.clj
  2. +6 −5 src/leiningen/npm.clj
View
2 project.clj
@@ -1,4 +1,4 @@
-(defproject lein-npm "0.3.0"
+(defproject lein-npm "0.3.1-SNAPSHOT"
:description "Manage Node dependencies for CLJS projects"
:url "https://github.com/bodil/lein-npm"
:license {:name "Apache License, version 2.0"
View
11 src/leiningen/npm.clj
@@ -46,11 +46,12 @@
(defn- project->package
[project]
(json/generate-string
- (-> (project :nodejs)
- (merge {:name (project :name)
- :description (project :description)
- :version (project :version)
- :dependencies (transform-deps (resolve-node-deps project))}))
+ (merge {:private true} ;; prevent npm warnings about repository and README
+ (project :nodejs)
+ {:name (project :name)
+ :description (project :description)
+ :version (project :version)
+ :dependencies (transform-deps (resolve-node-deps project))})
{:pretty true}))
(defn write-json-file
Something went wrong with that request. Please try again.