Skip to content

Commit

Permalink
Updated loader, MD5 library moved to lfm plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
buger committed Jan 8, 2012
1 parent 40d6842 commit 75388ae
Show file tree
Hide file tree
Showing 16 changed files with 5,844 additions and 5,453 deletions.
14 changes: 8 additions & 6 deletions Cakefile
Expand Up @@ -28,6 +28,7 @@ yepnope.getFiles = (prefix) ->
result

GLOBAL.yepnope = yepnope
GLOBAL.debug = true

GLOBAL.browser =
extension:
Expand All @@ -37,17 +38,18 @@ GLOBAL.$ =
getJSON: (path, callback) ->
path = path.replace(/\?.*/,'')

fs.readFileSync path, "utf-8", (err, data) ->
data = JSON.parse(data)
callback(data)
data = fs.readFileSync path, "utf-8"
data = JSON.parse(data)
callback(data)


require "./src/chromus_loader.coffee"
require "./src/chromus.coffee"

concat = (fileList, distPath) ->
out = fileList.map (filePath) ->
fs.readFileSync(filePath, 'utf-8')
content = fs.readFileSync(filePath, 'utf-8')
"// File: #{filePath}\n#{content}"

fs.writeFileSync distPath, out.join("\n"), "utf-8"

Expand All @@ -69,10 +71,10 @@ uglify = (srcPath, distPath, header = "") ->
task "build", "Build everything and minify", (options) ->
popupjs = yepnope.getFiles('popup')
concat popupjs, "./build/popup.js"
uglify "./build/popup.js", "./build/popup.min.js", "window.debug=false;"
uglify "./build/popup.js", "./build/popup.min.js"

bgjs = yepnope.getFiles('bg')
concat bgjs, "./build/bg.js"
uglify "./build/bg.js", "./build/bg.min.js", "window.debug=false;"
uglify "./build/bg.js", "./build/bg.min.js"

concat yepnope.getFiles('css'), "./build/plugin_styles.css"
1 change: 1 addition & 0 deletions background.html
Expand Up @@ -4,6 +4,7 @@
<div id="vk_search"></div>

<script src="lib/yepnope.js"></script>
<script src="lib/browser_api.js"></script>
<script src="src/chromus_loader.js"></script>
</body>
</html>

0 comments on commit 75388ae

Please sign in to comment.