Skip to content
Permalink
Browse files

Merge pull request #182 from Pageworks/develop

Papertrain v0.2.2
  • Loading branch information...
codewithkyle committed Jun 21, 2019
2 parents 8de000d + f72264b commit ba142da84b56d140534589061f6f33e30110ad69

This file was deleted.

@@ -5,11 +5,8 @@
/node_modules

# Assets
/public/assets/
!/public/assets/fonts
!/public/assets/images
!/public/assets/polyfills
!/public/assets/videos
/public/automation/*
!/public/automation/.gitkeep

# Craft CMS
# -------
@@ -39,3 +36,4 @@ logs/
_compiled
.editorconfig
/config/papertrain/automation.php
.editorconfig
@@ -1,3 +1,22 @@
## 0.2.2 - 2010-06-21

### Added

- Adds: reset CSS to `base.twig` `<head>` [#181](https://github.com/Pageworks/papertrain/issues/181)
- Adds: `page.twig` layout for templates
- Adds: `public/automation/` directory due to gitignore issues with the assets directory [#180](https://github.com/Pageworks/papertrain/issues/180)
- Adds: `.editorconfig` file to `.gitignore`

### Fixed

- Fixes: updates Craft CMS to latest version
- Fixes: sets min-height to `100vh`
- Fixes: removes default padding from `<main>`

### Removed

- Removes: `.editorconfig` file

## 0.2.1 - 2010-06-17

### Added
@@ -2,7 +2,7 @@
{% do view.registerCssFile(REPLACE_WITH_CLASSAssets['REPLACE_WITH_KEBAB'].css) %}
SCRIPT_PLACEHOLDER

{% extends "_layouts/base" %}
{% extends "_layouts/page" %}

{% block content %}
<article class="REPLACE_WITH_SCSS_CLASS g-container -full" data-template="REPLACE_WITH_KEBAB" MODULE_PLACEHOLDER>
@@ -24,7 +24,7 @@ function compileSASS(){
console.log(chalk.white('Compiling SASS'));

// Make the new CSS directory
fs.mkdirSync(`./public/assets/styles-${ timestamp }`);
fs.mkdirSync(`./public/automation/styles-${ timestamp }`);

// Generate the files
for(let i = 0; i < files.length; i++){
@@ -41,7 +41,7 @@ function compileSASS(){
}else{
const fileName = result.stats.entry.match(/[ \w-]+?(?=\.)/gi)[0].toLowerCase();
if(fileName){
const newFile = `./public/assets/styles-${ timestamp }/` + fileName + '.css';
const newFile = `./public/automation/styles-${ timestamp }/` + fileName + '.css';
console.log(chalk.hex('#ffffff').bold(file), chalk.hex('#8cf57b').bold(' [compiled]'));
cleanup(files.indexOf(file));
fs.writeFile(newFile, result.css.toString(), function (err) {
@@ -71,7 +71,7 @@ function cleanup(index){

console.log(chalk.white('Removing stale CSS'));

const path = `public/assets`;
const path = `public/automation`;
const allDirs = fs.readdirSync(path);
const styleDirs = [];
for(let i = 0; i < allDirs.length; i++){
@@ -84,7 +84,7 @@ function cleanup(index){
const directoryTimestamp = styleDirs[i].match(/[^styles-].*/)[0];

if(parseInt(directoryTimestamp) < parseInt(timestamp)){
rimraf(`public/assets/${ styleDirs[i] }`, (err)=>{
rimraf(`public/automation/${ styleDirs[i] }`, (err)=>{
if(err){
console.log(`Failed to remove ${ styleDirs[i] }`);
throw err;
@@ -20,7 +20,7 @@
},
"require": {
"php": ">=7.0.0",
"craftcms/cms": "3.1.29",
"craftcms/cms": "3.1.31",
"vlucas/phpdotenv": "^2.4.0",
"roave/security-advisories": "dev-master",
"sebastianlenz/linkfield": "1.0.19",

Some generated files are not rendered by default. Learn more.

@@ -29,9 +29,9 @@ class PapertrainModuleService extends Component
public function buildAssetPaths(array $twigNames)
{
$ret = array();
$modulesBasePath = \Craft::getAlias('@rootUrl').'/assets/modules-' . Craft::$app->config->general->jsCacheBustTimestamp . '/';
$packagesBasePath = \Craft::getAlias('@rootUrl').'/assets/packages-' . Craft::$app->config->general->jsCacheBustTimestamp . '/';
$stylesBasePath = \Craft::getAlias('@rootUrl').'/assets/styles-' . Craft::$app->config->general->cssCacheBustTimestamp . '/';
$modulesBasePath = \Craft::getAlias('@rootUrl').'/automation/modules-' . Craft::$app->config->general->jsCacheBustTimestamp . '/';
$packagesBasePath = \Craft::getAlias('@rootUrl').'/automation/packages-' . Craft::$app->config->general->jsCacheBustTimestamp . '/';
$stylesBasePath = \Craft::getAlias('@rootUrl').'/automation/styles-' . Craft::$app->config->general->cssCacheBustTimestamp . '/';
foreach ($twigNames as $twigName){
$kebabCaseName = StringHelper::toKebabCase($twigName);
$finalName = StringHelper::toLowerCase($kebabCaseName);
No changes.
@@ -1,4 +1,4 @@
{% extends '_layouts/base.twig' %}
{% extends '_layouts/page.twig' %}

{% block content %}
<h1>404</h1>

0 comments on commit ba142da

Please sign in to comment.
You can’t perform that action at this time.