Baarakɛminɛnw jɔ
Bootstrap ka npm sɛbɛnni minnu bɛ a kɔnɔ, olu baaracogo dɔn walasa ka an ka sɛbɛnw jɔ, ka source code lajɛ, ka sɛgɛsɛgɛliw kɛ, ani fɛn wɛrɛw.
Baarakɛminɛnw sigicogo
Bootstrap bɛ baara Kɛ ni npm sɛbɛnniw ye a ka jɔli-sistɛm kama. An ka package.json kɔnɔ, fɛɛrɛ nɔgɔmanw bɛ yen minnu bɛ se ka kɛ ka baara kɛ ni framework ye, i n’a fɔ kode dalajɛli, sɛgɛsɛgɛliw bolicogo, ani fɛn wɛrɛw.
Walasa ka baara kɛ ni an ka build system ye ani k’an ka sɛbɛnw baara sigida la, i mago bɛ Bootstrap ka source files ni Node kopi dɔ la. Aw bɛ nin fɛɛrɛ ninnu labato ani aw ka kan ka labɛn ka girin:
- Node.js , an bɛ baara Kɛ ni min ye walasa k’an ka dannayakow ɲɛnabɔ, o telesarse k’a Blà a la.
- aw bɛ taa root
/bootstrap
directory la ka bolinpm install
walasa k' an ka sigida dantigɛliw sigi sen kan minnu kofɔlen bɛ package.json kɔnɔ . - Ruby sigi , Bundler sigi ni
gem install bundler
, ka laban ka bolibundle install
. O bɛna Ruby ka bolomafaraw bɛɛ sigi sen kan, i n’a fɔ Jekyll ani plugins.- Windows baarakɛlaw: Aw ye nin gafe in kalan walasa ka Jekyll daminɛ ka baara kɛ ni gɛlɛya tɛ.
Ni a dafara, i bɛ se ka cikan suguya minnu di ka bɔ cikan yɔrɔ la, i bɛ se ka olu baara.
Baara kɛ ni npm sɛbɛnniw ye
An ka package.json kɔnɔ, nin cikanw ni baara ninnu bɛ yen:
Baara | Cogojirali |
---|---|
npm run dist |
npm run dist bɛ /dist/ ɲɛbilasɛbɛn Dabɔ ni dosiyew lajɛlenw ye. A bɛ baara kɛ ni Sass , Autoprefixer ani UglifyJS ye . |
npm test |
Same as npm run dist plus a bɛ sɛgɛsɛgɛliw kɛ sigida la |
npm run docs |
A bɛ CSS ni JavaScript jɔ ani ka lint kɛ docs kama. o kɔfɛ aw bɛ se ka sɛbɛnw boli sigida la npm run docs-serve . |
Boli npm run
ka npm sɛbɛnniw bɛɛ ye.
Yɛrɛ-prefixer (Yɔrɔ-fɔcogo)
Bootstrap bɛ baara Kɛ ni Autoprefixer ye (min bɛ an ka jɔli taabolo la) walasa ka feerekɛlaw ka ɲɛfɔlisenw Fàra a yɛrɛma CSS nafolo dɔw kan jɔli waati la. O kɛli bɛ waati ni kode kisi an ma ni a b’a to an bɛ se k’an ka CSS yɔrɔ kolomaw sɛbɛn siɲɛ kelen k’a sɔrɔ an bɛ feerekɛlaw ka mixinw mago bɔ i n’a fɔ minnu bɛ sɔrɔ v3 kɔnɔ.
An bɛ navigatɔrɔw lisɛli mara minnu bɛ dɛmɛ sɔrɔ Autoprefixer fɛ dosiye wɛrɛ kɔnɔ an ka GitHub marayɔrɔ kɔnɔ. Aw ye .browserslistrc lajɛ walasa ka kunnafoni wɛrɛw sɔrɔ.
Sigida sɛbɛnw
An ka sɛbɛnw bolicogo sigida la, o bɛ Jekyll baara de wajibiya, n’o ye site generator static ye min bɛ se ka wuli ka bɔ a nɔ na, n’o bɛ se ka fɛn caman di an ma: basic includes, Markdown-based files, templates, ani fɛn wɛrɛw. A daminɛcogo filɛ nin ye:
- Boli ka tɛmɛ baarakɛminɛnw sigicogo kan sanfɛ walasa ka Jekyll (site dilanbaga) ni Ruby bolofara wɛrɛw sigi sen kan ni
bundle install
. - Ka bɔ root
/bootstrap
directory la, i ka bolinpm run docs-serve
cikan yɔrɔ la. - Da wuli
http://localhost:9001
i ka navigatɛri kɔnɔ, ani voilà.
Aw ye kunnafoni caman sɔrɔ Jekyll baaracogo kan n' a ka sɛbɛnw kalanni ye .
Gɛlɛyaw ɲɛnabɔli
Ni i ye gɛlɛya sɔrɔ dependencies (daɲɛw sigili) la, i ka dependency version kɔrɔw bɛɛ bɔ (dugukolo kan ani sigida la). O kɔfɛ, i ka segin ka npm install
baara kɛ .