0

I am creating a site that uses Java Script and CSS from jQuery and jQuery Mobile. Right now I am not hosting any of the files but rather referencing URLs on the jQuery site. This has the disadvantage that I have to load resources from jQuery every time the page loads and I cannot alter the files myself. I want to switch to hosting this stuff locally and would like to go about it in an organized and scalalable fashion. Is there any better way to do this than just copying the code from the links and pasting it into my own local .css and .js files?

4

1 に答える 1

0

新しいリリースごとに jQuery ソースを維持する必要があるため、jQuery ソースを変更することは理想的ではありません。追加したい機能がある場合は、jQuery プラグインを作成することをお勧めします。CSS および JavaScript ファイルに関するプロジェクトの管理に関しては、ほとんどの IDE は、JavaScript および CSS ファイルがscriptsおよびstylesプロジェクト ルートの下にそれぞれディレクトリを作成します。これに加えて、git などの何らかの形式のソース管理を使用して変更をカタログ化することをお勧めします。このツールの使用方法に関するドキュメントはウェブ上にたくさんありますが、ソース管理のどのような形式を使用するかを説明することは、StackOverflow で回答するには広すぎます。ただし、Web プロジェクトの構造を手動で管理している場合は特に、一定レベルの精神的規律を維持する必要があります。これには、時間と経験が必要であり、何があなたに最も適しているかがわかります。

于 2013-01-24T19:22:01.293 に答える