Skip to content

Commit

Permalink
Merge pull request #290 from bitovi/default-steal
Browse files Browse the repository at this point in the history
Remove custom steal build setup
  • Loading branch information
m-mujica authored Jun 28, 2018
2 parents 2a74c38 + fda0f8a commit ed9a105
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 34 deletions.
4 changes: 2 additions & 2 deletions lib/configured/configured_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe("lib/configured", function() {
});
});

it(".geneateProject is able to read the documentjs.json without versions and build a site", function() {
it(".generateProject is able to read the documentjs.json without versions and build a site", function() {
return rmdir(path.join(__dirname, "test", "api"))
.then(function() {
return configured.generateProject({
Expand All @@ -77,7 +77,7 @@ describe("lib/configured", function() {
});
});

it(".geneateProject is able to take a docObject instead of reading one", function() {
it(".generateProject is able to take a docObject instead of reading one", function() {
return rmdir(path.join(tmpPath, "example_project"))
.then(function() {
return configured.generateProject({
Expand Down
15 changes: 10 additions & 5 deletions lib/generators/html/build/make_package_json.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ module.exports = function makePackageJson(options) {
name: "docs",
version: "1.0.0",
main: "static.js",
system: {
steal: {
npmAlgorithm: "flat",
plugins: [
"steal-less",
"steal-stache"
],
meta: {
jquery: {
exports: "jQuery"
Expand All @@ -17,10 +21,11 @@ module.exports = function makePackageJson(options) {
"can-map": "^3.0.7",
"can-stache": "^3.0.24",
"can-util": "^3.6.1",
jquery: "~1.11.0",
steal: "0.16.X",
"steal-stache": "^3.0.7",
"steal-tools": "0.16.X"
"jquery": "~1.11.0",
"steal": "^1.12.3",
"steal-less": "^1.3.1",
"steal-stache": "^3.1.3",
"steal-tools": "^1.11.9",
}
};
};
4 changes: 1 addition & 3 deletions lib/generators/html/write/static_dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ var fss = require("../../../fs_extras.js"),
*/
module.exports = function(options) {
var source = path.join("site", "static", "dist", buildHash(options));
var dest = options.devBuild
? options.dest
: path.join(options.dest, "static");
var dest = options.dest;

return mkdirs(dest).then(function() {
if (options.debug) {
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@
"mocha": "^5.2.0",
"qunit-mocha-ui": "*",
"rimraf": "2.1",
"steal": "0.16.X",
"steal-stache": "^3.0.7",
"steal-tools": "0.16.X",
"steal": "^1.12.3",
"steal-less": "^1.3.1",
"steal-stache": "^3.1.3",
"steal-tools": "^1.11.9",
"zombie": "^4.2.1"
},
"dependencies": {
Expand Down
21 changes: 4 additions & 17 deletions site/default/static/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ module.exports = function(options, folders) {
.build(
{
main: "static",
config: path.join(__dirname, "package.json!npm"),
bundlesPath: path.join(__dirname, "bundles")
config: path.join(__dirname, "package.json!npm")
},
{
minify: options.minifyBuild === false ? false : true,
Expand All @@ -42,21 +41,9 @@ module.exports = function(options, folders) {

// copy everything to DIST
return Q.all([
fsExtras
.mkdirs(path.join(folders.dist, "bundles"))
.then(function() {
return fsExtras.copy(
path.join(folders.build, "bundles"),
path.join(folders.dist, "bundles")
);
}),
fsExtras.copyFrom(
path.join(
require.resolve("steal"),
"..",
"steal.production.js"
),
path.join(folders.dist, "steal.production.js")
fsExtras.copy(
path.join(folders.build, "dist"),
path.join(folders.dist, "dist")
),
fsExtras.copy(
path.join(folders.build, "package.json"),
Expand Down
6 changes: 2 additions & 4 deletions site/default/templates/layout.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<meta name="description" content="">
<meta name="author" content="">
{{^devBuild}}
<link rel="stylesheet" type="text/css" href="./static/bundles/static.css">
<link rel="stylesheet" type="text/css" href="./dist/bundles/static.css">
{{/devBuild}}
<!--[if lt IE 9]>
<script type="text/javascript" src="static/html5shiv.js"></script>
Expand Down Expand Up @@ -85,9 +85,7 @@
</script>
<script type="text/javascript"
data-main="static"
data-config="package.json!npm"
data-bundles-path="./static/bundles"
src="./static/steal.production.js">
src="./dist/steal.production.js">
</script>
{{/if}}
</body>
Expand Down

0 comments on commit ed9a105

Please sign in to comment.