From owner-freebsd-questions@freebsd.org Sun Oct 18 10:01:13 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEF50A1680C for ; Sun, 18 Oct 2015 10:01:13 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DA8ACBA for ; Sun, 18 Oct 2015 10:01:13 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from [93.104.6.185] (helo=localhost.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1Znkm4-0006zO-Rc; Sun, 18 Oct 2015 12:01:09 +0200 Received: from localhost.my.domain (c720-r276659 [127.0.0.1]) by localhost.unixarea.de (8.14.9/8.14.9) with ESMTP id t9IA16uf003896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 18 Oct 2015 12:01:07 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.14.9/8.14.9/Submit) id t9IA1624003895; Sun, 18 Oct 2015 12:01:06 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Sun, 18 Oct 2015 12:01:06 +0200 From: Matthias Apitz To: "Brandon J. Wandersee" Cc: Polytropon , freebsd-questions@freebsd.org Subject: Re: GitBook on FreeBSD? Message-ID: <20151018100106.GA3857@c720-r276659> Reply-To: Matthias Apitz Mail-Followup-To: Matthias Apitz , "Brandon J. Wandersee" , Polytropon , freebsd-questions@freebsd.org References: <20151016064251.GA1975@c720-r276659> <86mvvjymhd.fsf@WorkBox.Home> <20151016183244.GA21879@c720-r276659> <20151017012617.3bc51864.freebsd@edvax.de> <20151017103510.GB2597@c720-r276659> <867fmlnr54.fsf@WorkBox.Home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <867fmlnr54.fsf@WorkBox.Home> X-Operating-System: FreeBSD 11.0-CURRENT r269739 (i386) User-Agent: Mutt/1.5.23 (2014-03-12) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 93.104.6.185 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 10:01:14 -0000 El día Saturday, October 17, 2015 a las 04:04:23PM -0500, Brandon J. Wandersee escribió: > This isn't a good idea. > > https://docs.npmjs.com/getting-started/installing-npm-packages-locally > > Note that I don't use Node.js myself, so if those instructions cause > problems I'm afraid I can't help. I just figured that just as Python > eggs, Ruby gems, and Haskell Cabal packages can be installed locally as > a regular user, so can Node packages. It seems that's the case. Thanks! The video is not very instructive, esp. if one has never used Node. But, it gave me the idea that somehow a local installation is supported. I deduced to let away the flag '-g' (globally) and came up at the end with the following procedure to build a GitBooks locally: Install the npm - node package manager, from the FreeBSD' ports www/npm: # cd /usr/local/www/npm # make install clean Here is how to use 'npm' to install the GitBook gitbook-cli to create local web trees of a GitBook $ cd UbuntuPhone we will instaall gitbook-cli not globally, but in a local folder 'npm': $ mkdir npm $ cd npm $ npm install gitbook-cli gitbook-cli@1.0.0 node_modules/gitbook-cli ├── bash-color@0.0.3 ├── semver@5.0.1 ├── q@1.4.1 ├── commander@2.8.1 (graceful-readlink@1.0.1) ├── tmp@0.0.27 (os-tmpdir@1.0.1) ├── user-home@2.0.0 (os-homedir@1.0.1) ├── optimist@0.6.1 (wordwrap@0.0.3, minimist@0.0.10) ├── npmi@1.0.1 (semver@4.3.6) ├── lodash@3.10.1 ├── fs-extra@0.24.0 (path-is-absolute@1.0.0, jsonfile@2.2.3, graceful-fs@4.1.2, rimraf@2.4.3) └── npm@2.14.8 Now let's go to our GitBook and build a local web tree from it: $ cd ../bq-aquaris-e-4-5-ubuntu-phone # where my GitBook files are $ ../npm/node_modules/.bin/gitbook build Installing GitBook 2.4.x ... info: loading book configuration....OK info: load plugin gitbook-plugin-highlight ....OK info: >> 1 plugins loaded info: start generation with website generator info: clean website generator info: OK info: generation is finished Done, without error $ find _book/ _book/ _book/chapter23.html ... _book/index.html _book/chapter24.html $ firefox _book/index.html fine :-) -- Matthias Apitz, ✉ guru@unixarea.de, 🌐 http://www.unixarea.de/ ☎ +49-176-38902045