2016-08-31 10 views
3

Python-flaskとWordPressをBootstrapに統合する方法はすでに分かっています。私はまた、発電機meanjsのyeomon CRUDモジュールのサブジェネレータを使って、新しいCRUDモジュールの動作とビューを追加し、変更する方法も知っています。しかし、私は現在、meanjs.org平均スタックアプリジェネレータで生成されたファイル構造に圧倒されています。私は、一般的なファイル構造とMVCパターンに関連する相互作用を知っています。しかし、meanjs.org v0.4.2で生成されたデフォルトアプリをbootstrap v3.3.7 themeに統合するにはどうすればよいですか?私はそれをどうにかして確実に働かせることができましたが、最初から正しく正しい方法で設定したいと思っています。meanjs v0.4.2のデフォルトのアプリケーションをブートストラップのv3.3.7テーマに統合する方法

meanjsのすべての依存関係をインストールした後(nodejs、NPM、バウアールビー、SASS、イサキ-CLI)グローバルmeanjs骨格を有するyeamonジェネレータを含む:デフォルトアプリスケルトン

sudo npm install -g yo 
sudo npm install -g generator-meanjs 

そして生成:

このCLIメニュー選択で
yo meanjs 

What mean.js version would you like to generate? 0.4.2 
In which folder would you like the project to be generated? This can be changed later. (mean) 
What would you like to call your application? (MEAN) 
How would you describe your application? (Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js) 
How would you describe your application in comma separated key words? (MongoDB, Express, AngularJS, and Node.js) 
What is your company/author name? AUTHOR 
Would you like to generate the article example CRUD module? Y 
Would you like to generate the chat example module? Y 

このフォルダSTRUC 、私はあなたがMeanjsとブートストラップ統合することによって、何を意味するのか本当にわからない

/css 
    bootstrap.css (= bootstrap v3.3.7 !?) 
    bootstrap.min.css (= bootstrap v3.3.7 !?) 
    scrolling-nav.css (theme specfic) 
/fonts 
    (.eot, .svg, .ttf, woff and .woff2 glyphicons) 
/js 
    bootstrap.js (= bootstrap v3.3.7 !?) 
    bootstrap.min.js (= bootstrap v3.3.7 !?) 
    jquery.easing.min.js (= bootstrap v3.3.7 !?) 
    jquery.js (= bootstrap v3.3.7 !?) 
    scrolling-nav.js (theme specifc) 
index.hmtl (theme specific) 
(license and readme file) 

答えて

0

応じて次のようにテーマフォルダ/ファイル構造がある

/mean 
    /config 
    (some folders and files with configurations) 
    /modules 
    /core 
     /client 
     /controllers 
      header.client.controller.js 
      home.client.controller.js 
     /css 
      core.css 
     /views 
      (some other html files) 
     (some other folders) 
     /server 
     /controllers 
      core.server.controllers.js 
      errors.server.controller.js 
     /routes 
      core.server.routes.js 
     /services 
      menus.client.service.js 
      (another folder and js file) 
     /views 
      index.server.view.html 
      layout.server.view.html 
      (some other html files) 
     (another js file) 
     /tests 
     (nested folders /client and /server) 
    /users 
     (same structure like /core folder) 
    (and /articles and /chat which yould not be existend dependent on the cli menu selection) 
    /node_modules 
    (a lot of node modules) 
    /public 
    /lib 
     /angular-bootstrap 
     (some js, json and css files) 
     /bootstrap 
     (some folders and files) 
     (some other angular, jquery and other stuff) 
    /scripts 
    (shell and js script) 
    .bluemix 
    .git 
(a lot of environment/tool configuration files) 
(some javascript files ~ environment/tools) 

:多分関連ファイルをブートストラップとトゥーレが生成さを指摘しました私には既にデフォルトのアプリに統合されています。 config/assets/default.jsconfig/assets/production.jsに行く場合(一方は開発用、もう一方は製造用)、client.lib.cssclient.lib.jsの下にブートストラップモジュールが指定されています。これらのモジュールは、アプリケーション起動時に<!-- Application CSS Files --><!--Application JavaScript Files-->のコメントのすぐ下にあるmodules/core/server/views/layout.server.view.htmlにロードされます。

最新のブートストラップにアップグレードする場合は、bower.jsonファイルのバージョン番号を変更し、コマンドbower updateを実行してください。

+0

この回答はありがたいです。それは、ブートストラップ自体ではなく、テーマの統合に関するものです。テーマの更新をできるだけ簡単にしたいと思います。私にとっては、テーマindex.htmlの扱い方についての質問はまだ開いています。 html関連のものは/ core/server/views/indexに広がっているからです。 ...。 html、レイアウト。 ... .htmlとnodejsの他のhtmlファイルテーマ固有のhtmlファイルをこれらのnodejs htmlファイルとどのようにマージする必要がありますか? (私はできるだけテーマを更新するときに将来のマージを避けたい) – thinwybk

+1

テーマcssは、すべてのモジュールに独自のCSSファイルを追加することでオーバーライドできます。 'module/client'では、cssという名前のフォルダを作成してそこに追加することができます。ノードhtmlファイルは、テーマ固有のhtmlファイルと既にマージされています。 –

+0

「CSSオーバーライド」のコンセプトを教えていただきありがとうございます...私はいくつかのチュートリアルを検索する必要があります。 – thinwybk

関連する問題