ivandoric / olympos

This is just empty theme for starting your Wordpress projects, with built in support for Sass, Susy and Gulp.js.
102 stars 46 forks source link

Any info on why olympos.min.js won't load? #1

Open nolaandy opened 8 years ago

nolaandy commented 8 years ago

Gulp is reading the changes of olympos.min.js but when I visit the site and inspect the resources I only see these files in js: jquery, jquery-migrate, livereload, and wp-emoji-release.

The sass is compiling properly.

I linked directly to olympos.min.js and it loaded in inspector. The javascript doesn't appear to be compiling though because the code I put in main.js does not appear when I ctrl+f my custom code.

This is the top of my functions.php Any ideas on how I can track this issue down? ` <?php

/* Register Scripts and Style */

function theme_register_scripts() { wp_enqueue_style( 'olympos-css', get_stylesheet_uri() ); wp_enqueue_script( 'olympos-js', esc_url( trailingslashit( get_template_directory_uri() ) . 'js/olympos.min.js' ), array( 'jquery' ), '1.0', true ); } add_action( 'wp_enqueue_scripts', 'theme_register_scripts', 1 ); `

ivandoric commented 8 years ago

Hmm that is weird. olympos.min.js doesn't appear in resources for me as well. But it is there. If you view the source you will see it. It is linking to the file, I just don't understand why Chrome doesn't pick it in the resources.

I will check that out. Thanks.

nolaandy commented 8 years ago

Unfortunately it isn't visible for me when I view source. I can confirm it's not writing to the site with this basic jquery function:

$("body").click(function() { $(this).toggleClass('clicked'); });

It works when I put it in my custom .js file I am calling in header.php It doesn't work though when I add the same code in main.js, even though in grunt I see this:

[11:12:51] Starting 'uglify'... [11:12:51] Finished 'uglify' after 787 µs [11:12:52] c:\wamp\www\wp_dev_andy\content\themes\olympos\js\olympos.min.js relo aded.

Thanks for the reply.

Viktoru commented 7 years ago

Error: Cannot find module 'gulp-livereload' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19)

ivandoric commented 7 years ago

@Viktoru try doing npm install --save-dev gulp-livereload But I suggest you not use livereload at all. Maybe better to use Browsersync. I will have to update this repo soon.