Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanHavoc committed Jul 11, 2016
2 parents 37d06bd + 17e4ce2 commit 190b851
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ The available options are:
Key|Value|Description
---|---|---
sample_dark_background|boolean|Set the background of the component sample area to be a dark color.
sample_background_color|string|Override sample background color. This option take precident over the dark background color.
sample_min_height|integer|Astrum detects if a component is hidden at desktop or mobile resolutions by detecting the components rendered height. When it’s hidden in your project CSS, Astrum shows a message to this effect. If the component is absolutely positioned, it has no height so you can set a min-height with this option to ensure it is shown properly and Astrum messaging is shown correctly.
sample_mobile_hidden|boolean|Typically used in conjunction with the `sample_min_height` option if a component is meant to be hidden at mobile resolutions set this option to true.

Expand Down
2 changes: 1 addition & 1 deletion _template/app/css/styles.min.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions _template/app/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ var ndplComponent = Vue.extend({
if(_this.component.options.sample_min_height) {
styles += 'min-height:' + _this.component.options.sample_min_height + 'px;';
}
if(_this.component.options.sample_background_color) {
styles += 'background-color:' + _this.component.options.sample_background_color + ' !important;';
}
}

return styles;
Expand Down
2 changes: 1 addition & 1 deletion _template/app/js/main.min.js

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion manager/astrum.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,35 @@ var program = require('commander'),
fs = require('fs-extra'),
chalk = require('chalk'),
inquirer = require('inquirer'),
utils = require('./utils');
utils = require('./utils'),
pjson = require('../package.json');

program
.version(pjson.version)
.usage('[command]')
.command('init', 'initialize new pattern library')
.command('update', 'update existing pattern library')
.command('new', 'create a new component')
.command('edit', 'edit a component and/or group')
.command('delete', 'delete component and/or group')
.command('list', 'list components')
.option('-I, --instance', 'output the instance version number')
.parse(process.argv);

if (!process.argv.slice(2).length) {
program.outputHelp();
}

/**
* Get instance version number.
*/
if (program.instance) {
try {
if(utils.getConfig()) {
utils.init();
console.log(chalk.grey("This Astrum instance version is: ") + chalk.green(utils.$data.version));
}
} catch (e) {
console.log(chalk.red("Astrum has not been initialised."));
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "astrum",
"version": "1.5.10",
"version": "1.5.12",
"description": "A lightweight pattern library designed to be included with any web project.",
"main": "./manager/astrum.js",
"scripts": {
Expand Down

0 comments on commit 190b851

Please sign in to comment.